mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-30 07:20:53 +00:00
linux-3.0: remove old beagleboard-specific 3.0 and 3.1rc kernel recipes
Beagleboard is supported by newer 3.2 and 3.3.7 kernel recipes. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Acked-by: Franklin Cooper Jr. <fcooper@ti.com>
This commit is contained in:
-340
@@ -1,340 +0,0 @@
|
||||
From 3721255965a94417996df6f2402a288aa09cb5b2 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 21 Jul 2011 14:29:42 +0200
|
||||
Subject: [PATCH 1/3] UNFINISHED: OMAP3: beagle: add support for expansionboards
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 266 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 266 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 32f5f89..f26a9a8 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/opp.h>
|
||||
@@ -156,6 +157,167 @@ static void __init omap3_beagle_init_rev(void)
|
||||
}
|
||||
}
|
||||
|
||||
+char expansionboard_name[16];
|
||||
+
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+#include <linux/regulator/fixed.h>
|
||||
+#include <linux/wl12xx.h>
|
||||
+
|
||||
+#define OMAP_BEAGLE_WLAN_EN_GPIO (139)
|
||||
+#define OMAP_BEAGLE_BT_EN_GPIO (138)
|
||||
+#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137)
|
||||
+#define OMAP_BEAGLE_FM_EN_BT_WU (136)
|
||||
+
|
||||
+struct wl12xx_platform_data omap_beagle_wlan_data __initdata = {
|
||||
+ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO),
|
||||
+ .board_ref_clock = 2, /* 38.4 MHz */
|
||||
+};
|
||||
+
|
||||
+static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1};
|
||||
+static struct platform_device wl12xx_device = {
|
||||
+ .name = "kim",
|
||||
+ .id = -1,
|
||||
+ .dev.platform_data = &gpios,
|
||||
+};
|
||||
+
|
||||
+static struct omap2_hsmmc_info mmcbbt[] = {
|
||||
+ {
|
||||
+ .mmc = 1,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
+ .gpio_wp = 29,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "wl1271",
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
|
||||
+ .gpio_wp = -EINVAL,
|
||||
+ .gpio_cd = -EINVAL,
|
||||
+ .ocr_mask = MMC_VDD_165_195,
|
||||
+ .nonremovable = true,
|
||||
+ },
|
||||
+ {} /* Terminator */
|
||||
+ };
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vmmc2_supply =
|
||||
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
+
|
||||
+static struct regulator_init_data beagle_vmmc2 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1850000,
|
||||
+ .max_uV = 1850000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &beagle_vmmc2_supply,
|
||||
+};
|
||||
+
|
||||
+static struct fixed_voltage_config beagle_vwlan = {
|
||||
+ .supply_name = "vwl1271",
|
||||
+ .microvolts = 1800000, /* 1.8V */
|
||||
+ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO,
|
||||
+ .startup_delay = 70000, /* 70ms */
|
||||
+ .enable_high = 1,
|
||||
+ .enabled_at_boot = 0,
|
||||
+ .init_data = &beagle_vmmc2,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device omap_vwlan_device = {
|
||||
+ .name = "reg-fixed-voltage",
|
||||
+ .id = 1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &beagle_vwlan,
|
||||
+ },
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "enc28j60",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 20000000,
|
||||
+ .controller_data = &enc28j60_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_enc28j60_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
|
||||
+ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_enc28j60_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config ks8851_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "ks8851",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 36000000,
|
||||
+ .controller_data = &ks8851_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_ks8851_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0);
|
||||
+ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy2_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -254,6 +416,12 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
+ {
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA,
|
||||
+ .transceiver = true,
|
||||
+ .ocr_mask = 0x00100000, /* 3.3V */
|
||||
+ },
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
@@ -277,7 +445,15 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi")) {
|
||||
+ omap2_hsmmc_init(mmcbbt);
|
||||
+ } else {
|
||||
+ omap2_hsmmc_init(mmc);
|
||||
+ }
|
||||
+#else
|
||||
omap2_hsmmc_init(mmc);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
@@ -375,6 +551,19 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_RTC_DRV_DS1307) || \
|
||||
+ defined(CONFIG_RTC_DRV_DS1307_MODULE)
|
||||
+
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_zippy[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("eeprom", 0x50),
|
||||
+ I2C_BOARD_INFO("ds1307", 0x68),
|
||||
+ },
|
||||
+};
|
||||
+#else
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_zippy[] = {};
|
||||
+#endif
|
||||
+
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&beagle_twldata,
|
||||
@@ -479,6 +668,15 @@ static struct omap_board_mux board_mux[] __initdata = {
|
||||
};
|
||||
#endif
|
||||
|
||||
+static int __init expansionboard_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard_name, str, 16);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init beagle_opp_init(void)
|
||||
{
|
||||
int r = 0;
|
||||
@@ -542,6 +740,72 @@ static void __init omap3_beagle_init(void)
|
||||
/* REVISIT leave DVI powered down until it's needed ... */
|
||||
gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD");
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "zippy"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
|
||||
+ omap3beagle_enc28j60_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering I2C2 for zippy board\n");
|
||||
+ omap_register_i2c_bus(2, 400, beagle_i2c2_zippy,
|
||||
+ ARRAY_SIZE(beagle_i2c2_zippy));
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "zippy2"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n");
|
||||
+ omap3beagle_ks8851_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering I2C2 for zippy2 board\n");
|
||||
+ omap_register_i2c_bus(2, 400, beagle_i2c2_zippy,
|
||||
+ ARRAY_SIZE(beagle_i2c2_zippy));
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "trainer"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
|
||||
+ gpio_request(130, "sysfs");
|
||||
+ gpio_export(130, 1);
|
||||
+ gpio_request(131, "sysfs");
|
||||
+ gpio_export(131, 1);
|
||||
+ gpio_request(132, "sysfs");
|
||||
+ gpio_export(132, 1);
|
||||
+ gpio_request(133, "sysfs");
|
||||
+ gpio_export(133, 1);
|
||||
+ gpio_request(134, "sysfs");
|
||||
+ gpio_export(134, 1);
|
||||
+ gpio_request(135, "sysfs");
|
||||
+ gpio_export(135, 1);
|
||||
+ gpio_request(136, "sysfs");
|
||||
+ gpio_export(136, 1);
|
||||
+ gpio_request(137, "sysfs");
|
||||
+ gpio_export(137, 1);
|
||||
+ gpio_request(138, "sysfs");
|
||||
+ gpio_export(138, 1);
|
||||
+ gpio_request(139, "sysfs");
|
||||
+ gpio_export(139, 1);
|
||||
+ gpio_request(140, "sysfs");
|
||||
+ gpio_export(140, 1);
|
||||
+ gpio_request(141, "sysfs");
|
||||
+ gpio_export(141, 1);
|
||||
+ gpio_request(162, "sysfs");
|
||||
+ gpio_export(162, 1);
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi"))
|
||||
+ {
|
||||
+ if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
|
||||
+ pr_err("error setting wl12xx data\n");
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n");
|
||||
+ platform_device_register(&wl12xx_device);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n");
|
||||
+ platform_device_register(&omap_vwlan_device);
|
||||
+ }
|
||||
+
|
||||
usb_musb_init(NULL);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
|
||||
@@ -558,6 +822,8 @@ static void __init omap3_beagle_init(void)
|
||||
beagle_opp_init();
|
||||
}
|
||||
|
||||
+early_param("buddy", expansionboard_setup);
|
||||
+
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.boot_params = 0x80000100,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
From 6bdb8e890f8e5d11be3c4953d7d10f4a5f160cd4 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 21 Jul 2011 12:59:20 +0200
|
||||
Subject: [PATCH 2/3] HACK: OMAP3: beagle: switch to GPTIMER1
|
||||
|
||||
Breaks with B3 and older due to clock noise
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index f26a9a8..a04f5a0 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -832,5 +832,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
.init_early = omap3_beagle_init_early,
|
||||
.init_irq = omap3_beagle_init_irq,
|
||||
.init_machine = omap3_beagle_init,
|
||||
- .timer = &omap3_secure_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 6667757c5f8a473b9cbbe5f6d64eee65a52aad54 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 25 May 2011 08:57:40 +0200
|
||||
Subject: [PATCH 3/3] OMAP3: beagle: HACK! add in 1GHz OPP
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index a04f5a0..5e1d9f9 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -701,11 +701,13 @@ static void __init beagle_opp_init(void)
|
||||
/* Enable MPU 1GHz and lower opps */
|
||||
dev = &mh->od->pdev.dev;
|
||||
r = opp_enable(dev, 800000000);
|
||||
+ r |= opp_enable(dev, 1000000000);
|
||||
/* TODO: MPU 1GHz needs SR and ABB */
|
||||
|
||||
/* Enable IVA 800MHz and lower opps */
|
||||
dev = &dh->od->pdev.dev;
|
||||
r |= opp_enable(dev, 660000000);
|
||||
+ r |= opp_enable(dev, 800000000);
|
||||
/* TODO: DSP 800MHz needs SR and ABB */
|
||||
if (r) {
|
||||
pr_err("%s: failed to enable higher opp %d\n",
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,79 +0,0 @@
|
||||
Delivered-To: koen@dominion.thruhere.net
|
||||
Received: by 10.236.157.72 with SMTP id n48cs4581yhk;
|
||||
Fri, 5 Aug 2011 00:10:45 -0700 (PDT)
|
||||
Received: by 10.147.146.12 with SMTP id y12mr1585882yan.12.1312528245335;
|
||||
Fri, 05 Aug 2011 00:10:45 -0700 (PDT)
|
||||
Return-Path: <archit@ti.com>
|
||||
Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41])
|
||||
by mx.google.com with ESMTPS id x20si3422127ani.205.2011.08.05.00.10.45
|
||||
(version=TLSv1/SSLv3 cipher=OTHER);
|
||||
Fri, 05 Aug 2011 00:10:45 -0700 (PDT)
|
||||
Received-SPF: pass (google.com: domain of archit@ti.com designates 192.94.94.41 as permitted sender) client-ip=192.94.94.41;
|
||||
Authentication-Results: mx.google.com; spf=pass (google.com: domain of archit@ti.com designates 192.94.94.41 as permitted sender) smtp.mail=archit@ti.com
|
||||
Received: from dlep33.itg.ti.com ([157.170.170.112])
|
||||
by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p757AiHb023389
|
||||
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
|
||||
Fri, 5 Aug 2011 02:10:44 -0500
|
||||
Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27])
|
||||
by dlep33.itg.ti.com (8.13.7/8.13.8) with ESMTP id p757AiWp004418;
|
||||
Fri, 5 Aug 2011 02:10:44 -0500 (CDT)
|
||||
Received: from dlee73.ent.ti.com (localhost [127.0.0.1])
|
||||
by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p757AiBJ012377;
|
||||
Fri, 5 Aug 2011 02:10:44 -0500 (CDT)
|
||||
Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE73.ent.ti.com
|
||||
(157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Fri, 5 Aug 2011
|
||||
02:10:44 -0500
|
||||
Received: from legion.dal.design.ti.com (legion.dal.design.ti.com
|
||||
[128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id
|
||||
p757Ai9V018852; Fri, 5 Aug 2011 02:10:44 -0500
|
||||
Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.144]) by
|
||||
legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p757Aef10060;
|
||||
Fri, 5 Aug 2011 02:10:41 -0500 (CDT)
|
||||
From: Archit Taneja <archit@ti.com>
|
||||
To: <hvaibhav@ti.com>, <linux-media@vger.kernel.org>
|
||||
CC: <koen@dominion.thruhere.net>, <tomi.valkeinen@ti.com>,
|
||||
<linux-omap@vger.kernel.org>, Archit Taneja <archit@ti.com>
|
||||
Subject: [PATCH] [media] OMAP_VOUT: Fix build break caused by update_mode removal in DSS2
|
||||
Date: Fri, 5 Aug 2011 12:49:21 +0530
|
||||
Message-ID: <1312528761-18241-1-git-send-email-archit@ti.com>
|
||||
X-Mailer: git-send-email 1.7.1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain
|
||||
|
||||
The DSS2 driver does not support the configuration of the update_mode of a
|
||||
panel anymore. Remove the setting of update_mode done in omap_vout_probe().
|
||||
Ignore configuration of TE since omap_vout driver doesn't support manual update
|
||||
displays anyway.
|
||||
|
||||
Signed-off-by: Archit Taneja <archit@ti.com>
|
||||
---
|
||||
drivers/media/video/omap/omap_vout.c | 13 -------------
|
||||
1 files changed, 0 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
|
||||
index b5ef362..b3a5ecd 100644
|
||||
--- a/drivers/media/video/omap/omap_vout.c
|
||||
+++ b/drivers/media/video/omap/omap_vout.c
|
||||
@@ -2194,19 +2194,6 @@ static int __init omap_vout_probe(struct platform_device *pdev)
|
||||
"'%s' Display already enabled\n",
|
||||
def_display->name);
|
||||
}
|
||||
- /* set the update mode */
|
||||
- if (def_display->caps &
|
||||
- OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE) {
|
||||
- if (dssdrv->enable_te)
|
||||
- dssdrv->enable_te(def_display, 0);
|
||||
- if (dssdrv->set_update_mode)
|
||||
- dssdrv->set_update_mode(def_display,
|
||||
- OMAP_DSS_UPDATE_MANUAL);
|
||||
- } else {
|
||||
- if (dssdrv->set_update_mode)
|
||||
- dssdrv->set_update_mode(def_display,
|
||||
- OMAP_DSS_UPDATE_AUTO);
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.1
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
From 428afa6e7a96419f6f17158a9ac38ab24d664997 Mon Sep 17 00:00:00 2001
|
||||
From: Keerthy <j-keerthy@ti.com>
|
||||
Date: Wed, 4 May 2011 01:14:50 +0530
|
||||
Subject: [PATCH 1/2] Enabling Hwmon driver for twl4030-madc
|
||||
|
||||
Signed-off-by: Keerthy <j-keerthy@ti.com>
|
||||
---
|
||||
drivers/mfd/twl-core.c | 15 +++++++++++++++
|
||||
1 files changed, 15 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
|
||||
index a2eddc7..81fcf18 100644
|
||||
--- a/drivers/mfd/twl-core.c
|
||||
+++ b/drivers/mfd/twl-core.c
|
||||
@@ -83,6 +83,13 @@
|
||||
#define twl_has_madc() false
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\
|
||||
+ defined(CONFIG_SENSORS_TWL4030_MADC_MODULE)
|
||||
+#define twl_has_madc_hwmon() true
|
||||
+#else
|
||||
+#define twl_has_madc_hwmon() false
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_TWL4030_POWER
|
||||
#define twl_has_power() true
|
||||
#else
|
||||
@@ -669,6 +676,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
|
||||
return PTR_ERR(child);
|
||||
}
|
||||
|
||||
+if (twl_has_madc_hwmon()) {
|
||||
+ child = add_child(2, "twl4030_madc_hwmon",
|
||||
+ NULL, 0,
|
||||
+ true, pdata->irq_base + MADC_INTR_OFFSET, 0);
|
||||
+ if (IS_ERR(child))
|
||||
+ return PTR_ERR(child);
|
||||
+ }
|
||||
+
|
||||
if (twl_has_rtc()) {
|
||||
/*
|
||||
* REVISIT platform_data here currently might expose the
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From fbfdf09f148219d48ee35e830923ca75bbd0b91b Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Sat, 23 Jan 2010 06:26:54 -0800
|
||||
Subject: [PATCH 2/2] mfd: twl-core: enable madc clock
|
||||
|
||||
Now that the madc driver has been merged it is also necessary to enable the clock to the madc block
|
||||
|
||||
Signed-off-by: Steve Sakoman <steve@sakoman.com>
|
||||
---
|
||||
drivers/mfd/twl-core.c | 8 ++++++++
|
||||
include/linux/i2c/twl.h | 1 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
|
||||
index 81fcf18..08aa64f 100644
|
||||
--- a/drivers/mfd/twl-core.c
|
||||
+++ b/drivers/mfd/twl-core.c
|
||||
@@ -217,6 +217,11 @@
|
||||
|
||||
/* Few power values */
|
||||
#define R_CFG_BOOT 0x05
|
||||
+#define R_GPBR1 0x0C
|
||||
+
|
||||
+/* MADC clock values for R_GPBR1 */
|
||||
+#define MADC_HFCLK_EN 0x80
|
||||
+#define DEFAULT_MADC_CLK_EN 0x10
|
||||
|
||||
/* some fields in R_CFG_BOOT */
|
||||
#define HFCLK_FREQ_19p2_MHZ (1 << 0)
|
||||
@@ -1151,6 +1156,9 @@ static void clocks_init(struct device *dev,
|
||||
|
||||
e |= unprotect_pm_master();
|
||||
/* effect->MADC+USB ck en */
|
||||
+ if (twl_has_madc())
|
||||
+ e |= twl_i2c_write_u8(TWL_MODULE_INTBR,
|
||||
+ MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1);
|
||||
e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT);
|
||||
e |= protect_pm_master();
|
||||
|
||||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
|
||||
index 114c0f6..f060751 100644
|
||||
--- a/include/linux/i2c/twl.h
|
||||
+++ b/include/linux/i2c/twl.h
|
||||
@@ -74,6 +74,7 @@
|
||||
|
||||
#define TWL_MODULE_USB TWL4030_MODULE_USB
|
||||
#define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE
|
||||
+#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR
|
||||
#define TWL_MODULE_PIH TWL4030_MODULE_PIH
|
||||
#define TWL_MODULE_MADC TWL4030_MODULE_MADC
|
||||
#define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
# (c) 2009 - 2011 Koen Kooi <koen@dominion.thruhere.net>
|
||||
# This script will take a set of directories with patches and make a git tree out of it
|
||||
# After all the patches are applied it will output a SRC_URI fragment you can copy/paste into a recipe
|
||||
|
||||
TAG="mainline/master"
|
||||
EXTRATAG="-3.1"
|
||||
|
||||
git fetch mainline
|
||||
git am --abort
|
||||
git reset --hard ${TAG}
|
||||
rm export -rf
|
||||
|
||||
previous=${TAG}
|
||||
PATCHSET="beagle madc sgx"
|
||||
|
||||
# apply patches
|
||||
for patchset in ${PATCHSET} ; do
|
||||
git am $patchset/* && git tag "${patchset}${EXTRATAG}" -f
|
||||
done
|
||||
|
||||
# export patches and output SRC_URI for them
|
||||
for patchset in ${PATCHSET} ; do
|
||||
mkdir export/$patchset -p
|
||||
( cd export/$patchset && git format-patch ${previous}..${patchset}${EXTRATAG} >& /dev/null && for i in *.patch ; do echo " file://${patchset}/$i \\" ; done )
|
||||
previous=${patchset}${EXTRATAG}
|
||||
done
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
From 927d1d96b5c4d3439a301b73804ade67b8cdd81a Mon Sep 17 00:00:00 2001
|
||||
From: Vikram Pandita <vikram.pandita@ti.com>
|
||||
Date: Tue, 31 May 2011 09:24:58 +0100
|
||||
Subject: [PATCH] ARM: L2: Add and export outer_clean_all
|
||||
|
||||
The Errata 588369 and 539766 demands that clean all operation be done
|
||||
as clean each way at a time
|
||||
|
||||
This patch also raps the implementation under the CONFIG errata
|
||||
macro so that for non-errata version silicon it can be disabled
|
||||
|
||||
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
|
||||
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Cc: Woodruff, Richard <r-woodruff2@ti.com>
|
||||
---
|
||||
arch/arm/include/asm/outercache.h | 8 ++++++++
|
||||
arch/arm/mm/cache-l2x0.c | 1 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/include/asm/outercache.h b/arch/arm/include/asm/outercache.h
|
||||
index d838743..fa8cbd8 100644
|
||||
--- a/arch/arm/include/asm/outercache.h
|
||||
+++ b/arch/arm/include/asm/outercache.h
|
||||
@@ -28,6 +28,7 @@ struct outer_cache_fns {
|
||||
void (*clean_range)(unsigned long, unsigned long);
|
||||
void (*flush_range)(unsigned long, unsigned long);
|
||||
void (*flush_all)(void);
|
||||
+ void (*clean_all)(void);
|
||||
void (*inv_all)(void);
|
||||
void (*disable)(void);
|
||||
#ifdef CONFIG_OUTER_CACHE_SYNC
|
||||
@@ -61,6 +62,11 @@ static inline void outer_flush_all(void)
|
||||
if (outer_cache.flush_all)
|
||||
outer_cache.flush_all();
|
||||
}
|
||||
+static inline void outer_clean_all(void)
|
||||
+{
|
||||
+ if (outer_cache.clean_all)
|
||||
+ outer_cache.clean_all();
|
||||
+}
|
||||
|
||||
static inline void outer_inv_all(void)
|
||||
{
|
||||
@@ -97,6 +103,8 @@ static inline void outer_sync(void)
|
||||
#else
|
||||
static inline void outer_sync(void)
|
||||
{ }
|
||||
+static inline void outer_clean_all(void)
|
||||
+{ }
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_OUTERCACHE_H */
|
||||
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
|
||||
index 44c0867..10b79d6 100644
|
||||
--- a/arch/arm/mm/cache-l2x0.c
|
||||
+++ b/arch/arm/mm/cache-l2x0.c
|
||||
@@ -346,6 +346,7 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
|
||||
outer_cache.inv_all = l2x0_inv_all;
|
||||
outer_cache.disable = l2x0_disable;
|
||||
outer_cache.set_debug = l2x0_set_debug;
|
||||
+ outer_cache.clean_all = l2x0_clean_all;
|
||||
|
||||
printk(KERN_INFO "%s cache controller enabled\n", type);
|
||||
printk(KERN_INFO "l2x0: %d ways, CACHE_ID 0x%08x, AUX_CTRL 0x%08x, Cache size: %d B\n",
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-196
@@ -1,196 +0,0 @@
|
||||
From ba3e97075ad35eeaf35191c4e5c2b90de5d96209 Mon Sep 17 00:00:00 2001
|
||||
From: Fernandes, Joel A <joelagnel@ti.com>
|
||||
Date: Tue, 7 Jun 2011 15:54:45 -0500
|
||||
Subject: [PATCH 01/10] OMAP3: beagle: add support for beagleboard xM revision C
|
||||
|
||||
OMAP3: beagle: add support for beagleboard xM revision C
|
||||
|
||||
The USB enable GPIO has been in beagleboard xM revision C.
|
||||
The USER button has been moved since beagleboard xM.
|
||||
Also, board specific initialization has been moved to beagle_config struct
|
||||
and initialized in omap3_beagle_init_rev. Default values in struct are for xMC.
|
||||
|
||||
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 78 ++++++++++++++++++++-----------
|
||||
1 files changed, 51 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 34f8411..32f5f89 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -60,7 +60,8 @@
|
||||
* AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
|
||||
* C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
|
||||
* C4 = GPIO173, GPIO172, GPIO171: 1 0 1
|
||||
- * XM = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMA/XMB = GPIO173, GPIO172, GPIO171: 0 0 0
|
||||
+ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
|
||||
*/
|
||||
enum {
|
||||
OMAP3BEAGLE_BOARD_UNKN = 0,
|
||||
@@ -68,14 +69,26 @@ enum {
|
||||
OMAP3BEAGLE_BOARD_C1_3,
|
||||
OMAP3BEAGLE_BOARD_C4,
|
||||
OMAP3BEAGLE_BOARD_XM,
|
||||
+ OMAP3BEAGLE_BOARD_XMC,
|
||||
};
|
||||
|
||||
static u8 omap3_beagle_version;
|
||||
|
||||
-static u8 omap3_beagle_get_rev(void)
|
||||
-{
|
||||
- return omap3_beagle_version;
|
||||
-}
|
||||
+/*
|
||||
+ * Board-specific configuration
|
||||
+ * Defaults to BeagleBoard-xMC
|
||||
+ */
|
||||
+static struct {
|
||||
+ int mmc1_gpio_wp;
|
||||
+ int usb_pwr_level;
|
||||
+ int reset_gpio;
|
||||
+ int usr_button_gpio;
|
||||
+} beagle_config = {
|
||||
+ .mmc1_gpio_wp = -EINVAL,
|
||||
+ .usb_pwr_level = GPIOF_OUT_INIT_LOW,
|
||||
+ .reset_gpio = 129,
|
||||
+ .usr_button_gpio = 4,
|
||||
+};
|
||||
|
||||
static struct gpio omap3_beagle_rev_gpios[] __initdata = {
|
||||
{ 171, GPIOF_IN, "rev_id_0" },
|
||||
@@ -110,18 +123,32 @@ static void __init omap3_beagle_init_rev(void)
|
||||
case 7:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
|
||||
+ beagle_config.mmc1_gpio_wp = 29;
|
||||
+ beagle_config.reset_gpio = 170;
|
||||
+ beagle_config.usr_button_gpio = 7;
|
||||
break;
|
||||
case 6:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
|
||||
+ beagle_config.mmc1_gpio_wp = 23;
|
||||
+ beagle_config.reset_gpio = 170;
|
||||
+ beagle_config.usr_button_gpio = 7;
|
||||
break;
|
||||
case 5:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
|
||||
+ beagle_config.mmc1_gpio_wp = 23;
|
||||
+ beagle_config.reset_gpio = 170;
|
||||
+ beagle_config.usr_button_gpio = 7;
|
||||
break;
|
||||
case 0:
|
||||
- printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
+ beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
|
||||
+ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
|
||||
@@ -225,7 +252,7 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
- .gpio_wp = 29,
|
||||
+ .gpio_wp = -EINVAL,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
@@ -243,17 +270,11 @@ static struct gpio_led gpio_leds[];
|
||||
static int beagle_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
- int r, usb_pwr_level;
|
||||
-
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
- mmc[0].gpio_wp = -EINVAL;
|
||||
- } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) ||
|
||||
- (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
|
||||
- omap_mux_init_gpio(23, OMAP_PIN_INPUT);
|
||||
- mmc[0].gpio_wp = 23;
|
||||
- } else {
|
||||
- omap_mux_init_gpio(29, OMAP_PIN_INPUT);
|
||||
- }
|
||||
+ int r;
|
||||
+
|
||||
+ if (beagle_config.mmc1_gpio_wp != -EINVAL)
|
||||
+ omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
|
||||
+ mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
@@ -263,9 +284,8 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
* high / others active low)
|
||||
* DVI reset GPIO is different between beagle revisions
|
||||
*/
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
- usb_pwr_level = GPIOF_OUT_INIT_HIGH;
|
||||
- beagle_dvi_device.reset_gpio = 129;
|
||||
+ /* Valid for all -xM revisions */
|
||||
+ if (cpu_is_omap3630()) {
|
||||
/*
|
||||
* gpio + 1 on Xm controls the TFP410's enable line (active low)
|
||||
* gpio + 2 control varies depending on the board rev as below:
|
||||
@@ -283,8 +303,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
pr_err("%s: unable to configure DVI_LDO_EN\n",
|
||||
__func__);
|
||||
} else {
|
||||
- usb_pwr_level = GPIOF_OUT_INIT_LOW;
|
||||
- beagle_dvi_device.reset_gpio = 170;
|
||||
/*
|
||||
* REVISIT: need ehci-omap hooks for external VBUS
|
||||
* power switch and overcurrent detect
|
||||
@@ -292,8 +310,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
|
||||
pr_err("%s: unable to configure EHCI_nOC\n", __func__);
|
||||
}
|
||||
+ beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
|
||||
|
||||
- gpio_request_one(gpio + TWL4030_GPIO_MAX, usb_pwr_level, "nEN_USB_PWR");
|
||||
+ gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
|
||||
+ "nEN_USB_PWR");
|
||||
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
@@ -404,7 +424,8 @@ static struct platform_device leds_gpio = {
|
||||
static struct gpio_keys_button gpio_buttons[] = {
|
||||
{
|
||||
.code = BTN_EXTRA,
|
||||
- .gpio = 7,
|
||||
+ /* Dynamically assigned depending on board */
|
||||
+ .gpio = -EINVAL,
|
||||
.desc = "user",
|
||||
.wakeup = 1,
|
||||
},
|
||||
@@ -468,8 +489,8 @@ static void __init beagle_opp_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
- /* Custom OPP enabled for XM */
|
||||
- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) {
|
||||
+ /* Custom OPP enabled for all xM versions */
|
||||
+ if (cpu_is_omap3630()) {
|
||||
struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
|
||||
struct omap_hwmod *dh = omap_hwmod_lookup("iva");
|
||||
struct device *dev;
|
||||
@@ -509,6 +530,9 @@ static void __init omap3_beagle_init(void)
|
||||
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
|
||||
omap3_beagle_init_rev();
|
||||
omap3_beagle_i2c_init();
|
||||
+
|
||||
+ gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
|
||||
+
|
||||
platform_add_devices(omap3_beagle_devices,
|
||||
ARRAY_SIZE(omap3_beagle_devices));
|
||||
omap_display_init(&beagle_dss_data);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-340
@@ -1,340 +0,0 @@
|
||||
From 73366785ad8400aa22ffc0822ecc701349477de9 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 21 Jul 2011 14:29:42 +0200
|
||||
Subject: [PATCH 02/10] UNFINISHED: OMAP3: beagle: add support for expansionboards
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 266 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 266 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 32f5f89..f26a9a8 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/irq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/gpio_keys.h>
|
||||
#include <linux/opp.h>
|
||||
@@ -156,6 +157,167 @@ static void __init omap3_beagle_init_rev(void)
|
||||
}
|
||||
}
|
||||
|
||||
+char expansionboard_name[16];
|
||||
+
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+#include <linux/regulator/fixed.h>
|
||||
+#include <linux/wl12xx.h>
|
||||
+
|
||||
+#define OMAP_BEAGLE_WLAN_EN_GPIO (139)
|
||||
+#define OMAP_BEAGLE_BT_EN_GPIO (138)
|
||||
+#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137)
|
||||
+#define OMAP_BEAGLE_FM_EN_BT_WU (136)
|
||||
+
|
||||
+struct wl12xx_platform_data omap_beagle_wlan_data __initdata = {
|
||||
+ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO),
|
||||
+ .board_ref_clock = 2, /* 38.4 MHz */
|
||||
+};
|
||||
+
|
||||
+static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1};
|
||||
+static struct platform_device wl12xx_device = {
|
||||
+ .name = "kim",
|
||||
+ .id = -1,
|
||||
+ .dev.platform_data = &gpios,
|
||||
+};
|
||||
+
|
||||
+static struct omap2_hsmmc_info mmcbbt[] = {
|
||||
+ {
|
||||
+ .mmc = 1,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
+ .gpio_wp = 29,
|
||||
+ },
|
||||
+ {
|
||||
+ .name = "wl1271",
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
|
||||
+ .gpio_wp = -EINVAL,
|
||||
+ .gpio_cd = -EINVAL,
|
||||
+ .ocr_mask = MMC_VDD_165_195,
|
||||
+ .nonremovable = true,
|
||||
+ },
|
||||
+ {} /* Terminator */
|
||||
+ };
|
||||
+
|
||||
+static struct regulator_consumer_supply beagle_vmmc2_supply =
|
||||
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
+
|
||||
+static struct regulator_init_data beagle_vmmc2 = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1850000,
|
||||
+ .max_uV = 1850000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = 1,
|
||||
+ .consumer_supplies = &beagle_vmmc2_supply,
|
||||
+};
|
||||
+
|
||||
+static struct fixed_voltage_config beagle_vwlan = {
|
||||
+ .supply_name = "vwl1271",
|
||||
+ .microvolts = 1800000, /* 1.8V */
|
||||
+ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO,
|
||||
+ .startup_delay = 70000, /* 70ms */
|
||||
+ .enable_high = 1,
|
||||
+ .enabled_at_boot = 0,
|
||||
+ .init_data = &beagle_vmmc2,
|
||||
+};
|
||||
+
|
||||
+static struct platform_device omap_vwlan_device = {
|
||||
+ .name = "reg-fixed-voltage",
|
||||
+ .id = 1,
|
||||
+ .dev = {
|
||||
+ .platform_data = &beagle_vwlan,
|
||||
+ },
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config enc28j60_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "enc28j60",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 20000000,
|
||||
+ .controller_data = &enc28j60_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_enc28j60_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0);
|
||||
+ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_enc28j60_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
+#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE)
|
||||
+
|
||||
+#include <plat/mcspi.h>
|
||||
+#include <linux/spi/spi.h>
|
||||
+
|
||||
+#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157
|
||||
+
|
||||
+static struct omap2_mcspi_device_config ks8851_spi_chip_info = {
|
||||
+ .turbo_mode = 0,
|
||||
+ .single_channel = 1, /* 0: slave, 1: master */
|
||||
+};
|
||||
+
|
||||
+static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = {
|
||||
+ {
|
||||
+ .modalias = "ks8851",
|
||||
+ .bus_num = 4,
|
||||
+ .chip_select = 0,
|
||||
+ .max_speed_hz = 36000000,
|
||||
+ .controller_data = &ks8851_spi_chip_info,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static void __init omap3beagle_ks8851_init(void)
|
||||
+{
|
||||
+ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) &&
|
||||
+ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) {
|
||||
+ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0);
|
||||
+ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ);
|
||||
+ irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING);
|
||||
+ } else {
|
||||
+ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ spi_register_board_info(omap3beagle_zippy2_spi_board_info,
|
||||
+ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info));
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+static inline void __init omap3beagle_ks8851_init(void) { return; }
|
||||
+#endif
|
||||
+
|
||||
static struct mtd_partition omap3beagle_nand_partitions[] = {
|
||||
/* All the partition sizes are listed in terms of NAND block size */
|
||||
{
|
||||
@@ -254,6 +416,12 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
.gpio_wp = -EINVAL,
|
||||
},
|
||||
+ {
|
||||
+ .mmc = 2,
|
||||
+ .caps = MMC_CAP_4_BIT_DATA,
|
||||
+ .transceiver = true,
|
||||
+ .ocr_mask = 0x00100000, /* 3.3V */
|
||||
+ },
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
@@ -277,7 +445,15 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
|
||||
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
+#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE)
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi")) {
|
||||
+ omap2_hsmmc_init(mmcbbt);
|
||||
+ } else {
|
||||
+ omap2_hsmmc_init(mmc);
|
||||
+ }
|
||||
+#else
|
||||
omap2_hsmmc_init(mmc);
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
@@ -375,6 +551,19 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
},
|
||||
};
|
||||
|
||||
+#if defined(CONFIG_RTC_DRV_DS1307) || \
|
||||
+ defined(CONFIG_RTC_DRV_DS1307_MODULE)
|
||||
+
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_zippy[] = {
|
||||
+ {
|
||||
+ I2C_BOARD_INFO("eeprom", 0x50),
|
||||
+ I2C_BOARD_INFO("ds1307", 0x68),
|
||||
+ },
|
||||
+};
|
||||
+#else
|
||||
+static struct i2c_board_info __initdata beagle_i2c2_zippy[] = {};
|
||||
+#endif
|
||||
+
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&beagle_twldata,
|
||||
@@ -479,6 +668,15 @@ static struct omap_board_mux board_mux[] __initdata = {
|
||||
};
|
||||
#endif
|
||||
|
||||
+static int __init expansionboard_setup(char *str)
|
||||
+{
|
||||
+ if (!str)
|
||||
+ return -EINVAL;
|
||||
+ strncpy(expansionboard_name, str, 16);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void __init beagle_opp_init(void)
|
||||
{
|
||||
int r = 0;
|
||||
@@ -542,6 +740,72 @@ static void __init omap3_beagle_init(void)
|
||||
/* REVISIT leave DVI powered down until it's needed ... */
|
||||
gpio_request_one(170, GPIOF_OUT_INIT_HIGH, "DVI_nPD");
|
||||
|
||||
+ if(!strcmp(expansionboard_name, "zippy"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n");
|
||||
+ omap3beagle_enc28j60_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering I2C2 for zippy board\n");
|
||||
+ omap_register_i2c_bus(2, 400, beagle_i2c2_zippy,
|
||||
+ ARRAY_SIZE(beagle_i2c2_zippy));
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "zippy2"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n");
|
||||
+ omap3beagle_ks8851_init();
|
||||
+ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n");
|
||||
+ mmc[1].gpio_wp = 141;
|
||||
+ mmc[1].gpio_cd = 162;
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering I2C2 for zippy2 board\n");
|
||||
+ omap_register_i2c_bus(2, 400, beagle_i2c2_zippy,
|
||||
+ ARRAY_SIZE(beagle_i2c2_zippy));
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "trainer"))
|
||||
+ {
|
||||
+ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n");
|
||||
+ gpio_request(130, "sysfs");
|
||||
+ gpio_export(130, 1);
|
||||
+ gpio_request(131, "sysfs");
|
||||
+ gpio_export(131, 1);
|
||||
+ gpio_request(132, "sysfs");
|
||||
+ gpio_export(132, 1);
|
||||
+ gpio_request(133, "sysfs");
|
||||
+ gpio_export(133, 1);
|
||||
+ gpio_request(134, "sysfs");
|
||||
+ gpio_export(134, 1);
|
||||
+ gpio_request(135, "sysfs");
|
||||
+ gpio_export(135, 1);
|
||||
+ gpio_request(136, "sysfs");
|
||||
+ gpio_export(136, 1);
|
||||
+ gpio_request(137, "sysfs");
|
||||
+ gpio_export(137, 1);
|
||||
+ gpio_request(138, "sysfs");
|
||||
+ gpio_export(138, 1);
|
||||
+ gpio_request(139, "sysfs");
|
||||
+ gpio_export(139, 1);
|
||||
+ gpio_request(140, "sysfs");
|
||||
+ gpio_export(140, 1);
|
||||
+ gpio_request(141, "sysfs");
|
||||
+ gpio_export(141, 1);
|
||||
+ gpio_request(162, "sysfs");
|
||||
+ gpio_export(162, 1);
|
||||
+ }
|
||||
+
|
||||
+ if(!strcmp(expansionboard_name, "bbtoys-wifi"))
|
||||
+ {
|
||||
+ if (wl12xx_set_platform_data(&omap_beagle_wlan_data))
|
||||
+ pr_err("error setting wl12xx data\n");
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n");
|
||||
+ platform_device_register(&wl12xx_device);
|
||||
+ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n");
|
||||
+ platform_device_register(&omap_vwlan_device);
|
||||
+ }
|
||||
+
|
||||
usb_musb_init(NULL);
|
||||
usbhs_init(&usbhs_bdata);
|
||||
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
|
||||
@@ -558,6 +822,8 @@ static void __init omap3_beagle_init(void)
|
||||
beagle_opp_init();
|
||||
}
|
||||
|
||||
+early_param("buddy", expansionboard_setup);
|
||||
+
|
||||
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
/* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */
|
||||
.boot_params = 0x80000100,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
From a7e1724833070f01b82381f40b084fd33e46836d Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 21 Jul 2011 12:59:20 +0200
|
||||
Subject: [PATCH 03/10] HACK: OMAP3: beagle: switch to GPTIMER1
|
||||
|
||||
Breaks with B3 and older due to clock noise
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index f26a9a8..a04f5a0 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -832,5 +832,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
.init_early = omap3_beagle_init_early,
|
||||
.init_irq = omap3_beagle_init_irq,
|
||||
.init_machine = omap3_beagle_init,
|
||||
- .timer = &omap3_secure_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
From 6ebc5081aba3428762e4e055a154fdda9ebe442e Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 25 May 2011 08:57:40 +0200
|
||||
Subject: [PATCH 04/10] OMAP3: beagle: HACK! add in 1GHz OPP
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index a04f5a0..5e1d9f9 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -701,11 +701,13 @@ static void __init beagle_opp_init(void)
|
||||
/* Enable MPU 1GHz and lower opps */
|
||||
dev = &mh->od->pdev.dev;
|
||||
r = opp_enable(dev, 800000000);
|
||||
+ r |= opp_enable(dev, 1000000000);
|
||||
/* TODO: MPU 1GHz needs SR and ABB */
|
||||
|
||||
/* Enable IVA 800MHz and lower opps */
|
||||
dev = &dh->od->pdev.dev;
|
||||
r |= opp_enable(dev, 660000000);
|
||||
+ r |= opp_enable(dev, 800000000);
|
||||
/* TODO: DSP 800MHz needs SR and ABB */
|
||||
if (r) {
|
||||
pr_err("%s: failed to enable higher opp %d\n",
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-202
@@ -1,202 +0,0 @@
|
||||
From f0a23fe6d3c8fc9bbb60a962114b64b923ca4515 Mon Sep 17 00:00:00 2001
|
||||
From: Sanjeev Premi <premi@ti.com>
|
||||
Date: Tue, 18 Jan 2011 13:19:55 +0530
|
||||
Subject: [PATCH 05/10] omap3: Add basic support for 720MHz part
|
||||
|
||||
This patch adds support for new speed enhanced parts with ARM
|
||||
and IVA running at 720MHz and 520MHz respectively. These parts
|
||||
can be probed at run-time by reading PRODID.SKUID[3:0] at
|
||||
0x4830A20C [1].
|
||||
|
||||
This patch specifically does following:
|
||||
* Detect devices capable of 720MHz.
|
||||
* Add new OPP
|
||||
* Ensure that OPP is conditionally enabled.
|
||||
* Check for presence of IVA before attempting to enable
|
||||
the corresponding OPP.
|
||||
|
||||
[1] http://focus.ti.com/lit/ug/spruff1d/spruff1d.pdf
|
||||
|
||||
Signed-off-by: Sanjeev Premi <premi@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/control.h | 7 ++++
|
||||
arch/arm/mach-omap2/id.c | 10 +++++
|
||||
arch/arm/mach-omap2/opp3xxx_data.c | 63 ++++++++++++++++++++++++++++++++-
|
||||
arch/arm/plat-omap/include/plat/cpu.h | 2 +
|
||||
4 files changed, 81 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
|
||||
index a016c8b..69d0b9c 100644
|
||||
--- a/arch/arm/mach-omap2/control.h
|
||||
+++ b/arch/arm/mach-omap2/control.h
|
||||
@@ -371,6 +371,13 @@
|
||||
#define FEAT_NEON 0
|
||||
#define FEAT_NEON_NONE 1
|
||||
|
||||
+/*
|
||||
+ * Product ID register
|
||||
+ */
|
||||
+#define OMAP3_PRODID 0x020C
|
||||
+
|
||||
+#define OMAP3_SKUID_MASK 0x0f
|
||||
+#define OMAP3_SKUID_720MHZ 0x08
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
|
||||
index 2537090..b6ed78a 100644
|
||||
--- a/arch/arm/mach-omap2/id.c
|
||||
+++ b/arch/arm/mach-omap2/id.c
|
||||
@@ -210,6 +210,15 @@ static void __init omap3_check_features(void)
|
||||
* TODO: Get additional info (where applicable)
|
||||
* e.g. Size of L2 cache.
|
||||
*/
|
||||
+
|
||||
+ /*
|
||||
+ * Does it support 720MHz?
|
||||
+ */
|
||||
+ status = (OMAP3_SKUID_MASK & read_tap_reg(OMAP3_PRODID));
|
||||
+
|
||||
+ if (status & OMAP3_SKUID_720MHZ) {
|
||||
+ omap3_features |= OMAP3_HAS_720MHZ;
|
||||
+ }
|
||||
}
|
||||
|
||||
static void __init ti816x_check_features(void)
|
||||
@@ -490,6 +499,7 @@ static void __init omap3_cpuinfo(void)
|
||||
OMAP3_SHOW_FEATURE(neon);
|
||||
OMAP3_SHOW_FEATURE(isp);
|
||||
OMAP3_SHOW_FEATURE(192mhz_clk);
|
||||
+ OMAP3_SHOW_FEATURE(720mhz);
|
||||
|
||||
printk(")\n");
|
||||
}
|
||||
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
index d95f3f9..44fbc84 100644
|
||||
--- a/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
@@ -18,8 +18,10 @@
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
+#include <linux/opp.h>
|
||||
|
||||
#include <plat/cpu.h>
|
||||
+#include <plat/omap_device.h>
|
||||
|
||||
#include "control.h"
|
||||
#include "omap_opp_data.h"
|
||||
@@ -98,6 +100,8 @@ static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {
|
||||
OPP_INITIALIZER("mpu", true, 550000000, OMAP3430_VDD_MPU_OPP4_UV),
|
||||
/* MPU OPP5 */
|
||||
OPP_INITIALIZER("mpu", true, 600000000, OMAP3430_VDD_MPU_OPP5_UV),
|
||||
+ /* MPU OPP6 */
|
||||
+ OPP_INITIALIZER("mpu", false, 720000000, 1350000),
|
||||
|
||||
/*
|
||||
* L3 OPP1 - 41.5 MHz is disabled because: The voltage for that OPP is
|
||||
@@ -123,6 +127,8 @@ static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {
|
||||
OPP_INITIALIZER("iva", true, 400000000, OMAP3430_VDD_MPU_OPP4_UV),
|
||||
/* DSP OPP5 */
|
||||
OPP_INITIALIZER("iva", true, 430000000, OMAP3430_VDD_MPU_OPP5_UV),
|
||||
+ /* DSP OPP6 */
|
||||
+ OPP_INITIALIZER("iva", false, 520000000, 1350000),
|
||||
};
|
||||
|
||||
static struct omap_opp_def __initdata omap36xx_opp_def_list[] = {
|
||||
@@ -150,6 +156,57 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = {
|
||||
OPP_INITIALIZER("iva", false, 800000000, OMAP3630_VDD_MPU_OPP1G_UV),
|
||||
};
|
||||
|
||||
+
|
||||
+/**
|
||||
+ * omap3_opp_enable_720Mhz() - Enable the OPP corresponding to 720MHz
|
||||
+ *
|
||||
+ * This function would be executed only if the silicon is capable of
|
||||
+ * running at the 720MHz.
|
||||
+ */
|
||||
+static int __init omap3_opp_enable_720Mhz(void)
|
||||
+{
|
||||
+ int r = -ENODEV;
|
||||
+ struct omap_hwmod *oh_mpu = omap_hwmod_lookup("mpu");
|
||||
+ struct omap_hwmod *oh_iva;
|
||||
+ struct platform_device *pdev;
|
||||
+
|
||||
+ if (!oh_mpu || !oh_mpu->od) {
|
||||
+ goto err;
|
||||
+ } else {
|
||||
+ pdev = &oh_mpu->od->pdev;
|
||||
+
|
||||
+ r = opp_enable(&pdev->dev, 720000000);
|
||||
+ if (r < 0) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "opp_enable() failed for mpu@720MHz");
|
||||
+ goto err;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (omap3_has_iva()) {
|
||||
+ oh_iva = omap_hwmod_lookup("iva");
|
||||
+
|
||||
+ if (!oh_iva || !oh_iva->od) {
|
||||
+ r = -ENODEV;
|
||||
+ goto err;
|
||||
+ } else {
|
||||
+ pdev = &oh_iva->od->pdev;
|
||||
+
|
||||
+ r = opp_enable(&pdev->dev, 520000000);
|
||||
+ if (r < 0) {
|
||||
+ dev_err(&pdev->dev,
|
||||
+ "opp_enable() failed for iva@520MHz");
|
||||
+ goto err;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ dev_info(&pdev->dev, "Enabled OPP corresponding to 720MHz\n");
|
||||
+
|
||||
+err:
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
/**
|
||||
* omap3_opp_init() - initialize omap3 opp table
|
||||
*/
|
||||
@@ -163,10 +220,14 @@ int __init omap3_opp_init(void)
|
||||
if (cpu_is_omap3630())
|
||||
r = omap_init_opp_table(omap36xx_opp_def_list,
|
||||
ARRAY_SIZE(omap36xx_opp_def_list));
|
||||
- else
|
||||
+ else {
|
||||
r = omap_init_opp_table(omap34xx_opp_def_list,
|
||||
ARRAY_SIZE(omap34xx_opp_def_list));
|
||||
|
||||
+ if (omap3_has_720mhz())
|
||||
+ r = omap3_opp_enable_720Mhz();
|
||||
+ }
|
||||
+
|
||||
return r;
|
||||
}
|
||||
device_initcall(omap3_opp_init);
|
||||
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
|
||||
index 8198bb6..5204c1e 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/cpu.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/cpu.h
|
||||
@@ -478,6 +478,7 @@ extern u32 omap3_features;
|
||||
#define OMAP3_HAS_192MHZ_CLK BIT(5)
|
||||
#define OMAP3_HAS_IO_WAKEUP BIT(6)
|
||||
#define OMAP3_HAS_SDRC BIT(7)
|
||||
+#define OMAP3_HAS_720MHZ BIT(8)
|
||||
|
||||
#define OMAP3_HAS_FEATURE(feat,flag) \
|
||||
static inline unsigned int omap3_has_ ##feat(void) \
|
||||
@@ -493,5 +494,6 @@ OMAP3_HAS_FEATURE(isp, ISP)
|
||||
OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK)
|
||||
OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP)
|
||||
OMAP3_HAS_FEATURE(sdrc, SDRC)
|
||||
+OMAP3_HAS_FEATURE(720mhz, 720MHZ)
|
||||
|
||||
#endif
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From d9242a243b61059cacde8ce1241b84fc787c57d1 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Thu, 20 Oct 2011 11:14:08 +0200
|
||||
Subject: [PATCH 06/10] ARM: OMAP2+: beagleboard: make wilink init look more like pandaboard
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 8 +-------
|
||||
1 files changed, 1 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 5e1d9f9..13fffb0 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -203,13 +203,7 @@ static struct regulator_consumer_supply beagle_vmmc2_supply =
|
||||
|
||||
static struct regulator_init_data beagle_vmmc2 = {
|
||||
.constraints = {
|
||||
- .min_uV = 1850000,
|
||||
- .max_uV = 1850000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = 1,
|
||||
.consumer_supplies = &beagle_vmmc2_supply,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 47be8c9046c22715ce646091dd9e98fa87fc86e1 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Mon, 18 Jul 2011 23:13:41 -0500
|
||||
Subject: [PATCH 07/10] omap_hsmmc: Set dto to max value of 14 to avoid SD Card timeouts
|
||||
|
||||
This fixes MMC errors due to timeouts on certain SD Cards following suggestions
|
||||
to set dto to 14 by Jason Kridner and Steven Kipisz
|
||||
|
||||
Details of the issue:
|
||||
http://talk.maemo.org/showthread.php?p=1000707#post1000707
|
||||
|
||||
This fix was originally proposed by Sukumar Ghoral of TI.
|
||||
---
|
||||
drivers/mmc/host/omap_hsmmc.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
|
||||
index dedf3da..a8a60d4 100644
|
||||
--- a/drivers/mmc/host/omap_hsmmc.c
|
||||
+++ b/drivers/mmc/host/omap_hsmmc.c
|
||||
@@ -1441,6 +1441,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host,
|
||||
dto = 14;
|
||||
}
|
||||
|
||||
+ /* Set dto to max value of 14 to avoid SD Card timeouts */
|
||||
+ dto = 14;
|
||||
+
|
||||
reg &= ~DTO_MASK;
|
||||
reg |= dto << DTO_SHIFT;
|
||||
OMAP_HSMMC_WRITE(host->base, SYSCTL, reg);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-89
@@ -1,89 +0,0 @@
|
||||
From 2a9282daf94e8b9a1c8dc6fdf5b97461eb15348d Mon Sep 17 00:00:00 2001
|
||||
From: Andy Green <andy@warmcat.com>
|
||||
Date: Thu, 24 Mar 2011 21:27:29 +0000
|
||||
Subject: [PATCH 08/10] OMAP2+: add cpu id register to MAC address helper
|
||||
|
||||
Introduce a generic helper function that can set a MAC address using
|
||||
data from the OMAP unique CPU ID register.
|
||||
|
||||
For comparison purposes this produces a MAC address of
|
||||
|
||||
2e:40:70:f0:12:06
|
||||
|
||||
for the ethernet device on my Panda.
|
||||
|
||||
Note that this patch requires the fix patch for CPU ID register
|
||||
indexes previously posted to linux-omap, otherwise the CPU ID is
|
||||
misread on Panda by the existing function to do it. This patch
|
||||
is already on linux-omap.
|
||||
|
||||
"OMAP2+:Common CPU DIE ID reading code reads wrong registers for OMAP4430"
|
||||
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=b235e007831dbf57710e59cd4a120e2f374eecb9
|
||||
|
||||
Signed-off-by: Andy Green <andy.green@linaro.org>
|
||||
---
|
||||
arch/arm/mach-omap2/id.c | 39 +++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/include/mach/id.h | 1 +
|
||||
2 files changed, 40 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
|
||||
index b6ed78a..de993f1 100644
|
||||
--- a/arch/arm/mach-omap2/id.c
|
||||
+++ b/arch/arm/mach-omap2/id.c
|
||||
@@ -567,3 +567,42 @@ void __init omap2_set_globals_tap(struct omap_globals *omap2_globals)
|
||||
else
|
||||
tap_prod_id = 0x0208;
|
||||
}
|
||||
+
|
||||
+/*
|
||||
+ * this uses the unique per-cpu info from the cpu fuses set at factory to
|
||||
+ * generate a 6-byte MAC address. Two bits in the generated code are used
|
||||
+ * to elaborate the generated address into four, so it can be used on multiple
|
||||
+ * network interfaces.
|
||||
+ */
|
||||
+
|
||||
+void omap2_die_id_to_ethernet_mac(u8 *mac, int subtype)
|
||||
+{
|
||||
+ struct omap_die_id odi;
|
||||
+ u32 tap = read_tap_reg(OMAP_TAP_IDCODE);
|
||||
+
|
||||
+ omap_get_die_id(&odi);
|
||||
+
|
||||
+ mac[0] = odi.id_2;
|
||||
+ mac[1] = odi.id_2 >> 8;
|
||||
+ mac[2] = odi.id_1;
|
||||
+ mac[3] = odi.id_1 >> 8;
|
||||
+ mac[4] = odi.id_1 >> 16;
|
||||
+ mac[5] = odi.id_1 >> 24;
|
||||
+
|
||||
+ /* XOR other chip-specific data with ID */
|
||||
+
|
||||
+ tap ^= odi.id_3;
|
||||
+
|
||||
+ mac[0] ^= tap;
|
||||
+ mac[1] ^= tap >> 8;
|
||||
+ mac[2] ^= tap >> 16;
|
||||
+ mac[3] ^= tap >> 24;
|
||||
+
|
||||
+ /* allow four MACs from this same basic data */
|
||||
+
|
||||
+ mac[1] = (mac[1] & ~0xc0) | ((subtype & 3) << 6);
|
||||
+
|
||||
+ /* mark it as not multicast and outside official 80211 MAC namespace */
|
||||
+
|
||||
+ mac[0] = (mac[0] & ~1) | 2;
|
||||
+}
|
||||
diff --git a/arch/arm/mach-omap2/include/mach/id.h b/arch/arm/mach-omap2/include/mach/id.h
|
||||
index 02ed3aa..373313a 100644
|
||||
--- a/arch/arm/mach-omap2/include/mach/id.h
|
||||
+++ b/arch/arm/mach-omap2/include/mach/id.h
|
||||
@@ -18,5 +18,6 @@ struct omap_die_id {
|
||||
};
|
||||
|
||||
void omap_get_die_id(struct omap_die_id *odi);
|
||||
+void omap2_die_id_to_ethernet_mac(u8 *mac, int subtype);
|
||||
|
||||
#endif
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-156
@@ -1,156 +0,0 @@
|
||||
From d0212d089b62cd7ebcd53104717180482e35ec1a Mon Sep 17 00:00:00 2001
|
||||
From: Jason Kridner <jdk@ti.com>
|
||||
Date: Thu, 15 Sep 2011 18:23:02 -0400
|
||||
Subject: [PATCH 09/10] HACK: OMAP2+: BeagleBoard: Fix up random or missing MAC addresses for eth0 and wlan0
|
||||
|
||||
This was borrowed from the Panda implementation at http://patches.linaro.org/777/
|
||||
|
||||
This patch registers a network device notifier callback to set the mac
|
||||
addresses for the onboard network assets of the BeagleBoard correctly, despite the
|
||||
drivers involved have used a random or all-zeros MAC address.
|
||||
|
||||
The technique was suggested by Alan Cox on lkml.
|
||||
|
||||
It works by device path so it corrects the MAC addresses even if the
|
||||
drivers are in modules loaded in an order that changes their interface
|
||||
name from usual (eg, the onboard module might be "wlan1" if there is a
|
||||
USB wireless stick plugged in and its module is inserted first.)
|
||||
|
||||
Cc: Andy Green <andy@warmcat.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 90 +++++++++++++++++++++++++++++++
|
||||
1 files changed, 90 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 13fffb0..5ffe185 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
+#include <linux/netdevice.h>
|
||||
+#include <linux/if_ether.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
@@ -42,6 +44,7 @@
|
||||
|
||||
#include <plat/board.h>
|
||||
#include <plat/common.h>
|
||||
+#include <mach/id.h>
|
||||
#include <video/omapdss.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
#include <plat/gpmc.h>
|
||||
@@ -91,6 +94,90 @@ static struct {
|
||||
.usr_button_gpio = 4,
|
||||
};
|
||||
|
||||
+/*
|
||||
+ * This device path represents the onboard USB <-> Ethernet bridge
|
||||
+ * on the BeagleBoard-xM which needs a random or all-zeros
|
||||
+ * mac address replaced with a per-cpu stable generated one
|
||||
+ */
|
||||
+
|
||||
+static const char * const xm_fixup_mac_device_paths[] = {
|
||||
+ "usb1/1-2/1-2.1/1-2.1:1.0",
|
||||
+};
|
||||
+
|
||||
+static int beagle_device_path_need_mac(struct device *dev)
|
||||
+{
|
||||
+ const char **try = (const char **) xm_fixup_mac_device_paths;
|
||||
+ const char *path;
|
||||
+ int count = ARRAY_SIZE(xm_fixup_mac_device_paths);
|
||||
+ const char *p;
|
||||
+ int len;
|
||||
+ struct device *devn;
|
||||
+
|
||||
+ while (count--) {
|
||||
+
|
||||
+ p = *try + strlen(*try);
|
||||
+ devn = dev;
|
||||
+
|
||||
+ while (devn) {
|
||||
+
|
||||
+ path = dev_name(devn);
|
||||
+ len = strlen(path);
|
||||
+
|
||||
+ if ((p - *try) < len) {
|
||||
+ devn = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ p -= len;
|
||||
+
|
||||
+ if (strncmp(path, p, len)) {
|
||||
+ devn = NULL;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ devn = devn->parent;
|
||||
+ if (p == *try)
|
||||
+ return count;
|
||||
+
|
||||
+ if (devn != NULL && (p - *try) < 2)
|
||||
+ devn = NULL;
|
||||
+
|
||||
+ p--;
|
||||
+ if (devn != NULL && *p != '/')
|
||||
+ devn = NULL;
|
||||
+ }
|
||||
+
|
||||
+ try++;
|
||||
+ }
|
||||
+
|
||||
+ return -ENOENT;
|
||||
+}
|
||||
+
|
||||
+static int omap_beagle_netdev_event(struct notifier_block *this,
|
||||
+ unsigned long event, void *ptr)
|
||||
+{
|
||||
+ struct net_device *dev = ptr;
|
||||
+ struct sockaddr sa;
|
||||
+ int n;
|
||||
+
|
||||
+ if (event != NETDEV_REGISTER)
|
||||
+ return NOTIFY_DONE;
|
||||
+
|
||||
+ n = beagle_device_path_need_mac(dev->dev.parent);
|
||||
+ if (n >= 0) {
|
||||
+ sa.sa_family = dev->type;
|
||||
+ omap2_die_id_to_ethernet_mac(sa.sa_data, n);
|
||||
+ dev->netdev_ops->ndo_set_mac_address(dev, &sa);
|
||||
+ }
|
||||
+
|
||||
+ return NOTIFY_DONE;
|
||||
+}
|
||||
+
|
||||
+static struct notifier_block omap_beagle_netdev_notifier = {
|
||||
+ .notifier_call = omap_beagle_netdev_event,
|
||||
+ .priority = 1,
|
||||
+};
|
||||
+
|
||||
static struct gpio omap3_beagle_rev_gpios[] __initdata = {
|
||||
{ 171, GPIOF_IN, "rev_id_0" },
|
||||
{ 172, GPIOF_IN, "rev_id_1" },
|
||||
@@ -146,14 +233,17 @@ static void __init omap3_beagle_init_rev(void)
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
|
||||
beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
|
||||
+ register_netdevice_notifier(&omap_beagle_netdev_notifier);
|
||||
break;
|
||||
case 2:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
|
||||
+ register_netdevice_notifier(&omap_beagle_netdev_notifier);
|
||||
break;
|
||||
default:
|
||||
printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
|
||||
omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN;
|
||||
+ register_netdevice_notifier(&omap_beagle_netdev_notifier);
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
From 713c5b4ce910dacdd75e9616b0f989d643008536 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 19 Oct 2011 12:44:14 +0200
|
||||
Subject: [PATCH 10/10] ARM: OMAP2+: beagleboard: fix mmc write protect pin when using the wilink expansion board
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 5ffe185..0124060 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -274,7 +274,7 @@ static struct omap2_hsmmc_info mmcbbt[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
|
||||
- .gpio_wp = 29,
|
||||
+ .gpio_wp = -EINVAL,
|
||||
},
|
||||
{
|
||||
.name = "wl1271",
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-29
@@ -1,29 +0,0 @@
|
||||
From a2139a0efb9472a649465a1080799c73470fd201 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Wed, 25 Jan 2012 15:48:36 +0100
|
||||
Subject: [PATCH] beagleboard: reinstate usage of hi-speed PLL divider
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 016d0985..c4c7a99 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -467,6 +467,11 @@ static struct omap_dss_device beagle_dvi_device = {
|
||||
.driver_name = "generic_dpi_panel",
|
||||
.data = &dvi_panel,
|
||||
.phy.dpi.data_lines = 24,
|
||||
+ .clocks = {
|
||||
+ .dispc = {
|
||||
+ .dispc_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC,
|
||||
+ },
|
||||
+ },
|
||||
.reset_gpio = -EINVAL,
|
||||
};
|
||||
|
||||
--
|
||||
1.7.7.5
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
-93
@@ -1,93 +0,0 @@
|
||||
From 2deaccf427c0fa1e87ed764877c03c2b1ba9b913 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:53 -0700
|
||||
Subject: [PATCH 1/8] OMAP3630: PRM: add ABB PRM register definitions
|
||||
|
||||
OMAP3630 supports an Adaptive Body-Bias ldo as well as some MPU interrupts
|
||||
related to voltage control that are not present on OMAP34XX. This patch
|
||||
adds the offsets, register addresses, bitfield shifts and masks to support
|
||||
this feature.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/prm-regbits-34xx.h | 34 ++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.h | 4 +++
|
||||
2 files changed, 38 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
|
||||
index 64c087a..0309ff6 100644
|
||||
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
|
||||
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
|
||||
@@ -216,6 +216,12 @@
|
||||
/* PRM_SYSCONFIG specific bits */
|
||||
|
||||
/* PRM_IRQSTATUS_MPU specific bits */
|
||||
+#define OMAP3630_VC_BYPASS_ACK_ST_SHIFT 28
|
||||
+#define OMAP3630_VC_BYPASS_ACK_ST_MASK (1 << 28)
|
||||
+#define OMAP3630_VC_VP1_ACK_ST_SHIFT 27
|
||||
+#define OMAP3630_VC_VP1_ACK_ST_MASK (1 << 27)
|
||||
+#define OMAP3630_ABB_LDO_TRANXDONE_ST_SHIFT 26
|
||||
+#define OMAP3630_ABB_LDO_TRANXDONE_ST_MASK (1 << 26)
|
||||
#define OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT 25
|
||||
#define OMAP3430ES2_SND_PERIPH_DPLL_ST_MASK (1 << 25)
|
||||
#define OMAP3430_VC_TIMEOUTERR_ST_MASK (1 << 24)
|
||||
@@ -248,6 +254,12 @@
|
||||
#define OMAP3430_FS_USB_WKUP_ST_MASK (1 << 1)
|
||||
|
||||
/* PRM_IRQENABLE_MPU specific bits */
|
||||
+#define OMAP3630_VC_BYPASS_ACK_EN_SHIFT 28
|
||||
+#define OMAP3630_VC_BYPASS_ACK_EN_MASK (1 << 28)
|
||||
+#define OMAP3630_VC_VP1_ACK_EN_SHIFT 27
|
||||
+#define OMAP3630_VC_VP1_ACK_EN_MASK (1 << 27)
|
||||
+#define OMAP3630_ABB_LDO_TRANXDONE_EN_SHIFT 26
|
||||
+#define OMAP3630_ABB_LDO_TRANXDONE_EN_MASK (1 << 26)
|
||||
#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT 25
|
||||
#define OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_MASK (1 << 25)
|
||||
#define OMAP3430_VC_TIMEOUTERR_EN_MASK (1 << 24)
|
||||
@@ -587,6 +599,28 @@
|
||||
|
||||
/* PRM_VP2_STATUS specific bits */
|
||||
|
||||
+/* PRM_LDO_ABB_SETUP specific bits */
|
||||
+#define OMAP3630_SR2_IN_TRANSITION_SHIFT 6
|
||||
+#define OMAP3630_SR2_IN_TRANSITION_MASK (1 << 6)
|
||||
+#define OMAP3630_SR2_STATUS_SHIFT 3
|
||||
+#define OMAP3630_SR2_STATUS_MASK (3 << 3)
|
||||
+#define OMAP3630_OPP_CHANGE_SHIFT 2
|
||||
+#define OMAP3630_OPP_CHANGE_MASK (1 << 2)
|
||||
+#define OMAP3630_OPP_SEL_SHIFT 0
|
||||
+#define OMAP3630_OPP_SEL_MASK (3 << 0)
|
||||
+
|
||||
+/* PRM_LDO_ABB_CTRL specific bits */
|
||||
+#define OMAP3630_SR2_WTCNT_VALUE_SHIFT 8
|
||||
+#define OMAP3630_SR2_WTCNT_VALUE_MASK (0xff << 8)
|
||||
+#define OMAP3630_SLEEP_RBB_SEL_SHIFT 3
|
||||
+#define OMAP3630_SLEEP_RBB_SEL_MASK (1 << 3)
|
||||
+#define OMAP3630_ACTIVE_FBB_SEL_SHIFT 2
|
||||
+#define OMAP3630_ACTIVE_FBB_SEL_MASK (1 << 2)
|
||||
+#define OMAP3630_ACTIVE_RBB_SEL_SHIFT 1
|
||||
+#define OMAP3630_ACTIVE_RBB_SEL_MASK (1 << 1)
|
||||
+#define OMAP3630_SR2EN_SHIFT 0
|
||||
+#define OMAP3630_SR2EN_MASK (1 << 0)
|
||||
+
|
||||
/* RM_RSTST_NEON specific bits */
|
||||
|
||||
/* PM_WKDEP_NEON specific bits */
|
||||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
index cef533d..408d1c7 100644
|
||||
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
@@ -167,6 +167,10 @@
|
||||
#define OMAP3430_PRM_VP2_VOLTAGE OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e0)
|
||||
#define OMAP3_PRM_VP2_STATUS_OFFSET 0x00e4
|
||||
#define OMAP3430_PRM_VP2_STATUS OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00e4)
|
||||
+#define OMAP3_PRM_LDO_ABB_SETUP_OFFSET 0x00f0
|
||||
+#define OMAP3630_PRM_LDO_ABB_SETUP OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f0)
|
||||
+#define OMAP3_PRM_LDO_ABB_CTRL_OFFSET 0x00f4
|
||||
+#define OMAP3630_PRM_LDO_ABB_CTRL OMAP34XX_PRM_REGADDR(OMAP3430_GR_MOD, 0x00f4)
|
||||
|
||||
#define OMAP3_PRM_CLKSEL_OFFSET 0x0040
|
||||
#define OMAP3430_PRM_CLKSEL OMAP34XX_PRM_REGADDR(OMAP3430_CCR_MOD, 0x0040)
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-263
@@ -1,263 +0,0 @@
|
||||
From 11401a7b96f5cd53362cd54238a58a5a54a00246 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:54 -0700
|
||||
Subject: [PATCH 2/8] OMAP3+: PM: VP: generalize PRM interrupt helpers
|
||||
|
||||
We have multiple interrupt status hidden in the PRM interrupt status
|
||||
reg. Make this handling generic to allow us to pull out LDO status such
|
||||
as those for ABB from it using the same data structure and indexing. We
|
||||
hence rename accordingly.
|
||||
|
||||
We also fix a trivial warning as the variable does not need exporting:
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.c:172:22: warning: symbol
|
||||
'omap3_prm_irqs' was not declared. Should it be static?
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.c | 22 +++++++++++-----------
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.h | 7 +++++--
|
||||
arch/arm/mach-omap2/prm44xx.c | 28 ++++++++++++++--------------
|
||||
arch/arm/mach-omap2/prm44xx.h | 7 +++++--
|
||||
arch/arm/mach-omap2/vp.h | 9 ---------
|
||||
arch/arm/mach-omap2/vp3xxx_data.c | 4 ++--
|
||||
arch/arm/mach-omap2/vp44xx_data.c | 6 +++---
|
||||
7 files changed, 40 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
index 3b83763..8a20242 100644
|
||||
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
@@ -162,39 +162,39 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift)
|
||||
/* PRM VP */
|
||||
|
||||
/*
|
||||
- * struct omap3_vp - OMAP3 VP register access description.
|
||||
+ * struct omap3_prm_irq - OMAP3 PRM IRQ register access description.
|
||||
* @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
*/
|
||||
-struct omap3_vp {
|
||||
+struct omap3_prm_irq {
|
||||
u32 tranxdone_status;
|
||||
};
|
||||
|
||||
-struct omap3_vp omap3_vp[] = {
|
||||
- [OMAP3_VP_VDD_MPU_ID] = {
|
||||
+static struct omap3_prm_irq omap3_prm_irqs[] = {
|
||||
+ [OMAP3_PRM_IRQ_VDD_MPU_ID] = {
|
||||
.tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK,
|
||||
},
|
||||
- [OMAP3_VP_VDD_CORE_ID] = {
|
||||
+ [OMAP3_PRM_IRQ_VDD_CORE_ID] = {
|
||||
.tranxdone_status = OMAP3430_VP2_TRANXDONE_ST_MASK,
|
||||
},
|
||||
};
|
||||
|
||||
#define MAX_VP_ID ARRAY_SIZE(omap3_vp);
|
||||
|
||||
-u32 omap3_prm_vp_check_txdone(u8 vp_id)
|
||||
+u32 omap3_prm_vp_check_txdone(u8 irq_id)
|
||||
{
|
||||
- struct omap3_vp *vp = &omap3_vp[vp_id];
|
||||
+ struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id];
|
||||
u32 irqstatus;
|
||||
|
||||
irqstatus = omap2_prm_read_mod_reg(OCP_MOD,
|
||||
OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
- return irqstatus & vp->tranxdone_status;
|
||||
+ return irqstatus & irq->tranxdone_status;
|
||||
}
|
||||
|
||||
-void omap3_prm_vp_clear_txdone(u8 vp_id)
|
||||
+void omap3_prm_vp_clear_txdone(u8 irq_id)
|
||||
{
|
||||
- struct omap3_vp *vp = &omap3_vp[vp_id];
|
||||
+ struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id];
|
||||
|
||||
- omap2_prm_write_mod_reg(vp->tranxdone_status,
|
||||
+ omap2_prm_write_mod_reg(irq->tranxdone_status,
|
||||
OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
index 408d1c7..d90b23f 100644
|
||||
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
@@ -307,9 +307,12 @@ extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift);
|
||||
extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift);
|
||||
extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift);
|
||||
|
||||
+#define OMAP3_PRM_IRQ_VDD_MPU_ID 0
|
||||
+#define OMAP3_PRM_IRQ_VDD_CORE_ID 1
|
||||
/* OMAP3-specific VP functions */
|
||||
-u32 omap3_prm_vp_check_txdone(u8 vp_id);
|
||||
-void omap3_prm_vp_clear_txdone(u8 vp_id);
|
||||
+u32 omap3_prm_vp_check_txdone(u8 irq_id);
|
||||
+void omap3_prm_vp_clear_txdone(u8 irq_id);
|
||||
+
|
||||
|
||||
/*
|
||||
* OMAP3 access functions for voltage controller (VC) and
|
||||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
|
||||
index 495a31a..b77d331 100644
|
||||
--- a/arch/arm/mach-omap2/prm44xx.c
|
||||
+++ b/arch/arm/mach-omap2/prm44xx.c
|
||||
@@ -57,49 +57,49 @@ u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
|
||||
/* PRM VP */
|
||||
|
||||
/*
|
||||
- * struct omap4_vp - OMAP4 VP register access description.
|
||||
+ * struct omap4_prm_irq - OMAP4 VP register access description.
|
||||
* @irqstatus_mpu: offset to IRQSTATUS_MPU register for VP
|
||||
* @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
*/
|
||||
-struct omap4_vp {
|
||||
+struct omap4_prm_irq {
|
||||
u32 irqstatus_mpu;
|
||||
u32 tranxdone_status;
|
||||
};
|
||||
|
||||
-static struct omap4_vp omap4_vp[] = {
|
||||
- [OMAP4_VP_VDD_MPU_ID] = {
|
||||
+static struct omap4_prm_irq omap4_prm_irqs[] = {
|
||||
+ [OMAP4_PRM_IRQ_VDD_MPU_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET,
|
||||
.tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK,
|
||||
},
|
||||
- [OMAP4_VP_VDD_IVA_ID] = {
|
||||
+ [OMAP4_PRM_IRQ_VDD_IVA_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
|
||||
.tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK,
|
||||
},
|
||||
- [OMAP4_VP_VDD_CORE_ID] = {
|
||||
+ [OMAP4_PRM_IRQ_VDD_CORE_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
|
||||
.tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK,
|
||||
},
|
||||
};
|
||||
|
||||
-u32 omap4_prm_vp_check_txdone(u8 vp_id)
|
||||
+u32 omap4_prm_vp_check_txdone(u8 irq_id)
|
||||
{
|
||||
- struct omap4_vp *vp = &omap4_vp[vp_id];
|
||||
+ struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id];
|
||||
u32 irqstatus;
|
||||
|
||||
irqstatus = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
|
||||
OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
- vp->irqstatus_mpu);
|
||||
- return irqstatus & vp->tranxdone_status;
|
||||
+ irq->irqstatus_mpu);
|
||||
+ return irqstatus & irq->tranxdone_status;
|
||||
}
|
||||
|
||||
-void omap4_prm_vp_clear_txdone(u8 vp_id)
|
||||
+void omap4_prm_vp_clear_txdone(u8 irq_id)
|
||||
{
|
||||
- struct omap4_vp *vp = &omap4_vp[vp_id];
|
||||
+ struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id];
|
||||
|
||||
- omap4_prminst_write_inst_reg(vp->tranxdone_status,
|
||||
+ omap4_prminst_write_inst_reg(irq->tranxdone_status,
|
||||
OMAP4430_PRM_PARTITION,
|
||||
OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
- vp->irqstatus_mpu);
|
||||
+ irq->irqstatus_mpu);
|
||||
};
|
||||
|
||||
u32 omap4_prm_vcvp_read(u8 offset)
|
||||
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
|
||||
index 3d66ccd..858ee53 100644
|
||||
--- a/arch/arm/mach-omap2/prm44xx.h
|
||||
+++ b/arch/arm/mach-omap2/prm44xx.h
|
||||
@@ -751,9 +751,12 @@ extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx);
|
||||
extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx);
|
||||
extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
|
||||
|
||||
+#define OMAP4_PRM_IRQ_VDD_CORE_ID 0
|
||||
+#define OMAP4_PRM_IRQ_VDD_IVA_ID 1
|
||||
+#define OMAP4_PRM_IRQ_VDD_MPU_ID 2
|
||||
/* OMAP4-specific VP functions */
|
||||
-u32 omap4_prm_vp_check_txdone(u8 vp_id);
|
||||
-void omap4_prm_vp_clear_txdone(u8 vp_id);
|
||||
+u32 omap4_prm_vp_check_txdone(u8 irq_id);
|
||||
+void omap4_prm_vp_clear_txdone(u8 irq_id);
|
||||
|
||||
/*
|
||||
* OMAP4 access functions for voltage controller (VC) and
|
||||
diff --git a/arch/arm/mach-omap2/vp.h b/arch/arm/mach-omap2/vp.h
|
||||
index d9bc4f1..ee31e2f 100644
|
||||
--- a/arch/arm/mach-omap2/vp.h
|
||||
+++ b/arch/arm/mach-omap2/vp.h
|
||||
@@ -21,15 +21,6 @@
|
||||
|
||||
struct voltagedomain;
|
||||
|
||||
-/*
|
||||
- * Voltage Processor (VP) identifiers
|
||||
- */
|
||||
-#define OMAP3_VP_VDD_MPU_ID 0
|
||||
-#define OMAP3_VP_VDD_CORE_ID 1
|
||||
-#define OMAP4_VP_VDD_CORE_ID 0
|
||||
-#define OMAP4_VP_VDD_IVA_ID 1
|
||||
-#define OMAP4_VP_VDD_MPU_ID 2
|
||||
-
|
||||
/* XXX document */
|
||||
#define VP_IDLE_TIMEOUT 200
|
||||
#define VP_TRANXDONE_TIMEOUT 300
|
||||
diff --git a/arch/arm/mach-omap2/vp3xxx_data.c b/arch/arm/mach-omap2/vp3xxx_data.c
|
||||
index 260c554..7bd8181 100644
|
||||
--- a/arch/arm/mach-omap2/vp3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/vp3xxx_data.c
|
||||
@@ -57,7 +57,7 @@ static const struct omap_vp_common omap3_vp_common = {
|
||||
};
|
||||
|
||||
struct omap_vp_instance omap3_vp_mpu = {
|
||||
- .id = OMAP3_VP_VDD_MPU_ID,
|
||||
+ .id = OMAP3_PRM_IRQ_VDD_MPU_ID,
|
||||
.common = &omap3_vp_common,
|
||||
.vpconfig = OMAP3_PRM_VP1_CONFIG_OFFSET,
|
||||
.vstepmin = OMAP3_PRM_VP1_VSTEPMIN_OFFSET,
|
||||
@@ -68,7 +68,7 @@ struct omap_vp_instance omap3_vp_mpu = {
|
||||
};
|
||||
|
||||
struct omap_vp_instance omap3_vp_core = {
|
||||
- .id = OMAP3_VP_VDD_CORE_ID,
|
||||
+ .id = OMAP3_PRM_IRQ_VDD_CORE_ID,
|
||||
.common = &omap3_vp_common,
|
||||
.vpconfig = OMAP3_PRM_VP2_CONFIG_OFFSET,
|
||||
.vstepmin = OMAP3_PRM_VP2_VSTEPMIN_OFFSET,
|
||||
diff --git a/arch/arm/mach-omap2/vp44xx_data.c b/arch/arm/mach-omap2/vp44xx_data.c
|
||||
index b4e7704..6de8ed6 100644
|
||||
--- a/arch/arm/mach-omap2/vp44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/vp44xx_data.c
|
||||
@@ -56,7 +56,7 @@ static const struct omap_vp_common omap4_vp_common = {
|
||||
};
|
||||
|
||||
struct omap_vp_instance omap4_vp_mpu = {
|
||||
- .id = OMAP4_VP_VDD_MPU_ID,
|
||||
+ .id = OMAP4_PRM_IRQ_VDD_MPU_ID,
|
||||
.common = &omap4_vp_common,
|
||||
.vpconfig = OMAP4_PRM_VP_MPU_CONFIG_OFFSET,
|
||||
.vstepmin = OMAP4_PRM_VP_MPU_VSTEPMIN_OFFSET,
|
||||
@@ -67,7 +67,7 @@ struct omap_vp_instance omap4_vp_mpu = {
|
||||
};
|
||||
|
||||
struct omap_vp_instance omap4_vp_iva = {
|
||||
- .id = OMAP4_VP_VDD_IVA_ID,
|
||||
+ .id = OMAP4_PRM_IRQ_VDD_IVA_ID,
|
||||
.common = &omap4_vp_common,
|
||||
.vpconfig = OMAP4_PRM_VP_IVA_CONFIG_OFFSET,
|
||||
.vstepmin = OMAP4_PRM_VP_IVA_VSTEPMIN_OFFSET,
|
||||
@@ -78,7 +78,7 @@ struct omap_vp_instance omap4_vp_iva = {
|
||||
};
|
||||
|
||||
struct omap_vp_instance omap4_vp_core = {
|
||||
- .id = OMAP4_VP_VDD_CORE_ID,
|
||||
+ .id = OMAP4_PRM_IRQ_VDD_CORE_ID,
|
||||
.common = &omap4_vp_common,
|
||||
.vpconfig = OMAP4_PRM_VP_CORE_CONFIG_OFFSET,
|
||||
.vstepmin = OMAP4_PRM_VP_CORE_VSTEPMIN_OFFSET,
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-202
@@ -1,202 +0,0 @@
|
||||
From da35165116eabf6149d558b426549784c93af164 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:55 -0700
|
||||
Subject: [PATCH 3/8] OMAP3+: PRM: add tranxdone IRQ handlers for ABB
|
||||
|
||||
OMAP3 and more recent platforms support a PRM interrupt to the MPU for
|
||||
Adapative Body-Bias ldo transitions.
|
||||
|
||||
Add helpers to the OMAP3 & OMAP4 PRM code to check the status of the
|
||||
interrupt and also to clear it. These will be called from the ABB code
|
||||
as part of the greater voltage scaling sequence.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.c | 35 ++++++++++++++++++++++++++-----
|
||||
arch/arm/mach-omap2/prm2xxx_3xxx.h | 3 ++
|
||||
arch/arm/mach-omap2/prm44xx.c | 40 +++++++++++++++++++++++++++++------
|
||||
arch/arm/mach-omap2/prm44xx.h | 3 ++
|
||||
4 files changed, 68 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
index 8a20242..49e9719 100644
|
||||
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
|
||||
@@ -163,18 +163,23 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift)
|
||||
|
||||
/*
|
||||
* struct omap3_prm_irq - OMAP3 PRM IRQ register access description.
|
||||
- * @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
+ * @vp_tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
+ * @abb_tranxdone_status: ABB_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
+ * (ONLY for OMAP3630)
|
||||
*/
|
||||
struct omap3_prm_irq {
|
||||
- u32 tranxdone_status;
|
||||
+ u32 vp_tranxdone_status;
|
||||
+ u32 abb_tranxdone_status;
|
||||
};
|
||||
|
||||
static struct omap3_prm_irq omap3_prm_irqs[] = {
|
||||
[OMAP3_PRM_IRQ_VDD_MPU_ID] = {
|
||||
- .tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK,
|
||||
+ .vp_tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK,
|
||||
+ .abb_tranxdone_status = OMAP3630_ABB_LDO_TRANXDONE_ST_MASK,
|
||||
},
|
||||
[OMAP3_PRM_IRQ_VDD_CORE_ID] = {
|
||||
- .tranxdone_status = OMAP3430_VP2_TRANXDONE_ST_MASK,
|
||||
+ .vp_tranxdone_status = OMAP3430_VP2_TRANXDONE_ST_MASK,
|
||||
+ /* no abb for core */
|
||||
},
|
||||
};
|
||||
|
||||
@@ -187,14 +192,32 @@ u32 omap3_prm_vp_check_txdone(u8 irq_id)
|
||||
|
||||
irqstatus = omap2_prm_read_mod_reg(OCP_MOD,
|
||||
OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
- return irqstatus & irq->tranxdone_status;
|
||||
+ return irqstatus & irq->vp_tranxdone_status;
|
||||
}
|
||||
|
||||
void omap3_prm_vp_clear_txdone(u8 irq_id)
|
||||
{
|
||||
struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id];
|
||||
|
||||
- omap2_prm_write_mod_reg(irq->tranxdone_status,
|
||||
+ omap2_prm_write_mod_reg(irq->vp_tranxdone_status,
|
||||
+ OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
+}
|
||||
+
|
||||
+u32 omap36xx_prm_abb_check_txdone(u8 irq_id)
|
||||
+{
|
||||
+ struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id];
|
||||
+ u32 irqstatus;
|
||||
+
|
||||
+ irqstatus = omap2_prm_read_mod_reg(OCP_MOD,
|
||||
+ OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
+ return irqstatus & irq->abb_tranxdone_status;
|
||||
+}
|
||||
+
|
||||
+void omap36xx_prm_abb_clear_txdone(u8 irq_id)
|
||||
+{
|
||||
+ struct omap3_prm_irq *irq = &omap3_prm_irqs[irq_id];
|
||||
+
|
||||
+ omap2_prm_write_mod_reg(irq->abb_tranxdone_status,
|
||||
OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
index d90b23f..08d5f1e 100644
|
||||
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h
|
||||
@@ -313,6 +313,9 @@ extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift);
|
||||
u32 omap3_prm_vp_check_txdone(u8 irq_id);
|
||||
void omap3_prm_vp_clear_txdone(u8 irq_id);
|
||||
|
||||
+/* OMAP36xx-specific ABB functions */
|
||||
+u32 omap36xx_prm_abb_check_txdone(u8 irq_id);
|
||||
+void omap36xx_prm_abb_clear_txdone(u8 irq_id);
|
||||
|
||||
/*
|
||||
* OMAP3 access functions for voltage controller (VC) and
|
||||
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
|
||||
index b77d331..dd3776c 100644
|
||||
--- a/arch/arm/mach-omap2/prm44xx.c
|
||||
+++ b/arch/arm/mach-omap2/prm44xx.c
|
||||
@@ -59,25 +59,30 @@ u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
|
||||
/*
|
||||
* struct omap4_prm_irq - OMAP4 VP register access description.
|
||||
* @irqstatus_mpu: offset to IRQSTATUS_MPU register for VP
|
||||
- * @tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
+ * @vp_tranxdone_status: VP_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
+ * @abb_tranxdone_status: ABB_TRANXDONE_ST bitmask in PRM_IRQSTATUS_MPU reg
|
||||
*/
|
||||
struct omap4_prm_irq {
|
||||
u32 irqstatus_mpu;
|
||||
- u32 tranxdone_status;
|
||||
+ u32 vp_tranxdone_status;
|
||||
+ u32 abb_tranxdone_status;
|
||||
};
|
||||
|
||||
static struct omap4_prm_irq omap4_prm_irqs[] = {
|
||||
[OMAP4_PRM_IRQ_VDD_MPU_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_2_OFFSET,
|
||||
- .tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK,
|
||||
+ .vp_tranxdone_status = OMAP4430_VP_MPU_TRANXDONE_ST_MASK,
|
||||
+ .abb_tranxdone_status = OMAP4430_ABB_MPU_DONE_ST_MASK
|
||||
},
|
||||
[OMAP4_PRM_IRQ_VDD_IVA_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
|
||||
- .tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK,
|
||||
+ .vp_tranxdone_status = OMAP4430_VP_IVA_TRANXDONE_ST_MASK,
|
||||
+ .abb_tranxdone_status = OMAP4430_ABB_IVA_DONE_ST_MASK,
|
||||
},
|
||||
[OMAP4_PRM_IRQ_VDD_CORE_ID] = {
|
||||
.irqstatus_mpu = OMAP4_PRM_IRQSTATUS_MPU_OFFSET,
|
||||
- .tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK,
|
||||
+ .vp_tranxdone_status = OMAP4430_VP_CORE_TRANXDONE_ST_MASK,
|
||||
+ /* Core has no ABB */
|
||||
},
|
||||
};
|
||||
|
||||
@@ -89,19 +94,40 @@ u32 omap4_prm_vp_check_txdone(u8 irq_id)
|
||||
irqstatus = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
|
||||
OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
irq->irqstatus_mpu);
|
||||
- return irqstatus & irq->tranxdone_status;
|
||||
+ return irqstatus & irq->vp_tranxdone_status;
|
||||
}
|
||||
|
||||
void omap4_prm_vp_clear_txdone(u8 irq_id)
|
||||
{
|
||||
struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id];
|
||||
|
||||
- omap4_prminst_write_inst_reg(irq->tranxdone_status,
|
||||
+ omap4_prminst_write_inst_reg(irq->vp_tranxdone_status,
|
||||
OMAP4430_PRM_PARTITION,
|
||||
OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
irq->irqstatus_mpu);
|
||||
};
|
||||
|
||||
+u32 omap4_prm_abb_check_txdone(u8 irq_id)
|
||||
+{
|
||||
+ struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id];
|
||||
+ u32 irqstatus;
|
||||
+
|
||||
+ irqstatus = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
|
||||
+ OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
+ irq->irqstatus_mpu);
|
||||
+ return irqstatus & irq->abb_tranxdone_status;
|
||||
+}
|
||||
+
|
||||
+void omap4_prm_abb_clear_txdone(u8 irq_id)
|
||||
+{
|
||||
+ struct omap4_prm_irq *irq = &omap4_prm_irqs[irq_id];
|
||||
+
|
||||
+ omap4_prminst_write_inst_reg(irq->abb_tranxdone_status,
|
||||
+ OMAP4430_PRM_PARTITION,
|
||||
+ OMAP4430_PRM_OCP_SOCKET_INST,
|
||||
+ irq->irqstatus_mpu);
|
||||
+}
|
||||
+
|
||||
u32 omap4_prm_vcvp_read(u8 offset)
|
||||
{
|
||||
return omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
|
||||
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
|
||||
index 858ee53..8ce3207 100644
|
||||
--- a/arch/arm/mach-omap2/prm44xx.h
|
||||
+++ b/arch/arm/mach-omap2/prm44xx.h
|
||||
@@ -757,6 +757,9 @@ extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
|
||||
/* OMAP4-specific VP functions */
|
||||
u32 omap4_prm_vp_check_txdone(u8 irq_id);
|
||||
void omap4_prm_vp_clear_txdone(u8 irq_id);
|
||||
+/* OMAP4-specific ABB functions */
|
||||
+u32 omap4_prm_abb_check_txdone(u8 irq_id);
|
||||
+void omap4_prm_abb_clear_txdone(u8 irq_id);
|
||||
|
||||
/*
|
||||
* OMAP4 access functions for voltage controller (VC) and
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-240
@@ -1,240 +0,0 @@
|
||||
From a0a304bd0a2255bc661933ef23b3a0860fbee69d Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:56 -0700
|
||||
Subject: [PATCH 4/8] OMAP3+: ABB: Adaptive Body-Bias structures & data
|
||||
|
||||
Due to voltage domain trimming and silicon characterstics some silicon
|
||||
may experience instability when operating at a high voltage. To
|
||||
compensate for this an Adaptive Body-Bias ldo exists. First featured in
|
||||
OMAP3630, the purpose of this ldo is to provide a voltage boost to PMOS
|
||||
backgates when a voltage domain is operating at a high OPP. In this
|
||||
mode the ldo is said to be in Forward Body-Bias. At OPPs within a
|
||||
nominal voltage range the ABB ldo is bypassed.
|
||||
|
||||
This patch introduces the data structures needed to represent the ABB
|
||||
ldo's in the voltage layer, and populates the appropriate data for 3630
|
||||
and OMAP4. Not all voltage domains have an ABB ldo, and OMAP34xx does
|
||||
not have it at all; in such cases the voltage data will be marked with
|
||||
OMAP_ABB_NO_LDO.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 5 +-
|
||||
arch/arm/mach-omap2/abb.h | 85 ++++++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/abb36xx_data.c | 38 ++++++++++++++++
|
||||
arch/arm/mach-omap2/abb44xx_data.c | 44 ++++++++++++++++++
|
||||
4 files changed, 170 insertions(+), 2 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap2/abb.h
|
||||
create mode 100644 arch/arm/mach-omap2/abb36xx_data.c
|
||||
create mode 100644 arch/arm/mach-omap2/abb44xx_data.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index 7927dd6..5bc306c 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -82,14 +82,15 @@ endif
|
||||
# PRCM
|
||||
obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
|
||||
obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o \
|
||||
- vc3xxx_data.o vp3xxx_data.o
|
||||
+ vc3xxx_data.o vp3xxx_data.o \
|
||||
+ abb36xx_data.o
|
||||
# XXX The presence of cm2xxx_3xxx.o on the line below is temporary and
|
||||
# will be removed once the OMAP4 part of the codebase is converted to
|
||||
# use OMAP4-specific PRCM functions.
|
||||
obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \
|
||||
cm44xx.o prcm_mpu44xx.o \
|
||||
prminst44xx.o vc44xx_data.o \
|
||||
- vp44xx_data.o
|
||||
+ vp44xx_data.o abb44xx_data.o
|
||||
|
||||
# OMAP voltage domains
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
diff --git a/arch/arm/mach-omap2/abb.h b/arch/arm/mach-omap2/abb.h
|
||||
new file mode 100644
|
||||
index 0000000..74f2044
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/abb.h
|
||||
@@ -0,0 +1,85 @@
|
||||
+/*
|
||||
+ * OMAP Adaptive Body-Bias structure and macro definitions
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Texas Instruments, Inc.
|
||||
+ * Mike Turquette <mturquette@ti.com>
|
||||
+ *
|
||||
+ * 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 __ARCH_ARM_MACH_OMAP2_ABB_H
|
||||
+#define __ARCH_ARM_MACH_OMAP2_ABB_H
|
||||
+
|
||||
+#include <linux/kernel.h>
|
||||
+
|
||||
+#include "voltage.h"
|
||||
+
|
||||
+/* NOMINAL_OPP bypasses the ABB ldo, FAST_OPP sets it to Forward Body-Bias */
|
||||
+#define OMAP_ABB_NOMINAL_OPP 0
|
||||
+#define OMAP_ABB_FAST_OPP 1
|
||||
+#define OMAP_ABB_NO_LDO ~0
|
||||
+
|
||||
+/* Time for the ABB ldo to settle after transition (in micro-seconds) */
|
||||
+#define ABB_TRANXDONE_TIMEOUT 50
|
||||
+
|
||||
+/*
|
||||
+ * struct omap_abb_ops - per-OMAP operations needed for ABB transition
|
||||
+ *
|
||||
+ * @check_tranxdone: return status of ldo transition from PRM_IRQSTATUS
|
||||
+ * @clear_tranxdone: clear ABB transition status bit from PRM_IRQSTATUS
|
||||
+ */
|
||||
+struct omap_abb_ops {
|
||||
+ u32 (*check_tranxdone)(u8 irq_id);
|
||||
+ void (*clear_tranxdone)(u8 irq_id);
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct omap_abb_common - ABB data common to an OMAP family
|
||||
+ *
|
||||
+ * @opp_sel_mask: CTRL reg uses this to program next state of ldo
|
||||
+ * @opp_change_mask: CTRL reg uses this to initiate ldo state change
|
||||
+ * @sr2_wtcnt_value_mask: SETUP reg uses this to program ldo settling time
|
||||
+ * @sr2en_mask: SETUP reg uses this to enable/disable ldo
|
||||
+ * @active_fbb_sel_mask: SETUP reg uses this to enable/disable FBB operation
|
||||
+ * @settling_time: number of micro-seconds it takes for ldo to transition
|
||||
+ * @clock_cycles: settling_time is counted in multiples of clock cycles
|
||||
+ * @ops: pointer to common ops for manipulating PRM_IRQSTATUS bits
|
||||
+ */
|
||||
+struct omap_abb_common {
|
||||
+ u32 opp_sel_mask;
|
||||
+ u32 opp_change_mask;
|
||||
+ u32 sr2_wtcnt_value_mask;
|
||||
+ u32 sr2en_mask;
|
||||
+ u32 active_fbb_sel_mask;
|
||||
+ unsigned long settling_time;
|
||||
+ unsigned long clock_cycles;
|
||||
+ const struct omap_abb_ops *ops;
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * struct omap_abb_instance - data for each instance of ABB ldo
|
||||
+ *
|
||||
+ * @setup_offs: PRM register offset for initial configuration of ABB ldo
|
||||
+ * @ctrl_offs: PRM register offset for active programming of ABB ldo
|
||||
+ * @prm_irq_id: IRQ handle used to resolve IRQSTATUS offset & masks
|
||||
+ * @enabled: track whether ABB ldo is enabled or disabled
|
||||
+ * @common: pointer to common data for all ABB ldo's
|
||||
+ * @_opp_sel: internally track last programmed state of ABB ldo. DO NOT USE
|
||||
+ */
|
||||
+struct omap_abb_instance {
|
||||
+ u8 setup_offs;
|
||||
+ u8 ctrl_offs;
|
||||
+ u8 prm_irq_id;
|
||||
+ bool enabled;
|
||||
+ const struct omap_abb_common *common;
|
||||
+ u8 _opp_sel;
|
||||
+};
|
||||
+
|
||||
+extern struct omap_abb_instance omap36xx_abb_mpu;
|
||||
+
|
||||
+extern struct omap_abb_instance omap4_abb_mpu;
|
||||
+extern struct omap_abb_instance omap4_abb_iva;
|
||||
+
|
||||
+#endif
|
||||
diff --git a/arch/arm/mach-omap2/abb36xx_data.c b/arch/arm/mach-omap2/abb36xx_data.c
|
||||
new file mode 100644
|
||||
index 0000000..0bcfd66
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/abb36xx_data.c
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * OMAP36xx Adaptive Body-Bias (ABB) data
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Texas Instruments, Inc.
|
||||
+ * Mike Turquette <mturquette@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+#include "abb.h"
|
||||
+#include "prm2xxx_3xxx.h"
|
||||
+#include "prm-regbits-34xx.h"
|
||||
+
|
||||
+static const struct omap_abb_ops omap36xx_abb_ops = {
|
||||
+ .check_tranxdone = &omap36xx_prm_abb_check_txdone,
|
||||
+ .clear_tranxdone = &omap36xx_prm_abb_clear_txdone,
|
||||
+};
|
||||
+
|
||||
+static const struct omap_abb_common omap36xx_abb_common = {
|
||||
+ .opp_sel_mask = OMAP3630_OPP_SEL_MASK,
|
||||
+ .opp_change_mask = OMAP3630_OPP_CHANGE_MASK,
|
||||
+ .sr2en_mask = OMAP3630_SR2EN_MASK,
|
||||
+ .active_fbb_sel_mask = OMAP3630_ACTIVE_FBB_SEL_MASK,
|
||||
+ .sr2_wtcnt_value_mask = OMAP3630_SR2_WTCNT_VALUE_MASK,
|
||||
+ .settling_time = 30,
|
||||
+ .clock_cycles = 8,
|
||||
+ .ops = &omap36xx_abb_ops,
|
||||
+};
|
||||
+
|
||||
+/* SETUP & CTRL registers swapped names in OMAP4; thus 36xx looks strange */
|
||||
+struct omap_abb_instance omap36xx_abb_mpu = {
|
||||
+ .setup_offs = OMAP3_PRM_LDO_ABB_CTRL_OFFSET,
|
||||
+ .ctrl_offs = OMAP3_PRM_LDO_ABB_SETUP_OFFSET,
|
||||
+ .prm_irq_id = OMAP3_PRM_IRQ_VDD_MPU_ID,
|
||||
+ .common = &omap36xx_abb_common,
|
||||
+};
|
||||
diff --git a/arch/arm/mach-omap2/abb44xx_data.c b/arch/arm/mach-omap2/abb44xx_data.c
|
||||
new file mode 100644
|
||||
index 0000000..a7cf855
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/abb44xx_data.c
|
||||
@@ -0,0 +1,44 @@
|
||||
+/*
|
||||
+ * OMAP44xx Adaptive Body-Bias (ABB) data
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Texas Instruments, Inc.
|
||||
+ * Mike Turquette <mturquette@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+#include "abb.h"
|
||||
+#include "prm44xx.h"
|
||||
+#include "prm-regbits-44xx.h"
|
||||
+
|
||||
+static const struct omap_abb_ops omap4_abb_ops = {
|
||||
+ .check_tranxdone = &omap4_prm_abb_check_txdone,
|
||||
+ .clear_tranxdone = &omap4_prm_abb_clear_txdone,
|
||||
+};
|
||||
+
|
||||
+static const struct omap_abb_common omap4_abb_common = {
|
||||
+ .opp_sel_mask = OMAP4430_OPP_SEL_MASK,
|
||||
+ .opp_change_mask = OMAP4430_OPP_CHANGE_MASK,
|
||||
+ .sr2en_mask = OMAP4430_SR2EN_MASK,
|
||||
+ .active_fbb_sel_mask = OMAP4430_ACTIVE_FBB_SEL_MASK,
|
||||
+ .sr2_wtcnt_value_mask = OMAP4430_SR2_WTCNT_VALUE_MASK,
|
||||
+ .settling_time = 50,
|
||||
+ .clock_cycles = 16,
|
||||
+ .ops = &omap4_abb_ops,
|
||||
+};
|
||||
+
|
||||
+struct omap_abb_instance omap4_abb_mpu = {
|
||||
+ .setup_offs = OMAP4_PRM_LDO_ABB_MPU_SETUP_OFFSET,
|
||||
+ .ctrl_offs = OMAP4_PRM_LDO_ABB_MPU_CTRL_OFFSET,
|
||||
+ .prm_irq_id = OMAP4_PRM_IRQ_VDD_MPU_ID,
|
||||
+ .common = &omap4_abb_common,
|
||||
+};
|
||||
+
|
||||
+struct omap_abb_instance omap4_abb_iva = {
|
||||
+ .setup_offs = OMAP4_PRM_LDO_ABB_IVA_SETUP_OFFSET,
|
||||
+ .ctrl_offs = OMAP4_PRM_LDO_ABB_IVA_CTRL_OFFSET,
|
||||
+ .prm_irq_id = OMAP4_PRM_IRQ_VDD_IVA_ID,
|
||||
+ .common = &omap4_abb_common,
|
||||
+};
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-194
@@ -1,194 +0,0 @@
|
||||
From 8d85fedcb9866f5041e2c63b54d3eff7fd88cf18 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:57 -0700
|
||||
Subject: [PATCH 5/8] OMAP3+: OPP: add ABB data to voltage tables
|
||||
|
||||
The operating mode of the Adaptive Body-Bias ldo maps directly to the
|
||||
voltage of its voltage domain. The two modes supported are bypass and
|
||||
Forward Body-Bias (FBB).
|
||||
|
||||
This patch models this relationship by adding an opp_sel paramter to
|
||||
struct omap_volt_data and populates this type in the 3630 and 4430
|
||||
voltage tables.
|
||||
|
||||
NOMINAL_OPP causes the ABB ldo to be in bypass at that specific voltage.
|
||||
FAST_OPP causes the ldo to operate in Forward Body-Bias mode.
|
||||
|
||||
Not all voltage domains have an ABB ldo and 3430 doesn't have one at
|
||||
all. In such cases voltages are marked with OMAP_ABB_NO_LDO.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_opp_data.h | 5 ++-
|
||||
arch/arm/mach-omap2/opp3xxx_data.c | 37 ++++++++++++++++++-----------------
|
||||
arch/arm/mach-omap2/opp4xxx_data.c | 25 ++++++++++++-----------
|
||||
arch/arm/mach-omap2/voltage.h | 1 +
|
||||
4 files changed, 36 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h
|
||||
index c784c12..5dd4dea 100644
|
||||
--- a/arch/arm/mach-omap2/omap_opp_data.h
|
||||
+++ b/arch/arm/mach-omap2/omap_opp_data.h
|
||||
@@ -71,12 +71,13 @@ struct omap_opp_def {
|
||||
* Initialization wrapper used to define SmartReflex process data
|
||||
* XXX Is this needed? Just use C99 initializers in data files?
|
||||
*/
|
||||
-#define VOLT_DATA_DEFINE(_v_nom, _efuse_offs, _errminlimit, _errgain) \
|
||||
+#define VOLT_DATA_DEFINE(_v_nom, _efuse_offs, _errminlimit, _errgain, _opp_sel) \
|
||||
{ \
|
||||
.volt_nominal = _v_nom, \
|
||||
.sr_efuse_offs = _efuse_offs, \
|
||||
.sr_errminlimit = _errminlimit, \
|
||||
- .vp_errgain = _errgain \
|
||||
+ .vp_errgain = _errgain, \
|
||||
+ .opp_sel = _opp_sel \
|
||||
}
|
||||
|
||||
/* Use this to initialize the default table */
|
||||
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
index d95f3f9..12fc2da 100644
|
||||
--- a/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "control.h"
|
||||
#include "omap_opp_data.h"
|
||||
#include "pm.h"
|
||||
+#include "abb.h"
|
||||
|
||||
/* 34xx */
|
||||
|
||||
@@ -36,12 +37,12 @@
|
||||
#define OMAP3430_VDD_MPU_OPP5_UV 1350000
|
||||
|
||||
struct omap_volt_data omap34xx_vddmpu_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP1_UV, OMAP343X_CONTROL_FUSE_OPP1_VDD1, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP2_UV, OMAP343X_CONTROL_FUSE_OPP2_VDD1, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, OMAP343X_CONTROL_FUSE_OPP3_VDD1, 0xf9, 0x18),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP4_UV, OMAP343X_CONTROL_FUSE_OPP4_VDD1, 0xf9, 0x18),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP5_UV, OMAP343X_CONTROL_FUSE_OPP5_VDD1, 0xf9, 0x18),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP1_UV, OMAP343X_CONTROL_FUSE_OPP1_VDD1, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP2_UV, OMAP343X_CONTROL_FUSE_OPP2_VDD1, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP3_UV, OMAP343X_CONTROL_FUSE_OPP3_VDD1, 0xf9, 0x18, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP4_UV, OMAP343X_CONTROL_FUSE_OPP4_VDD1, 0xf9, 0x18, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_MPU_OPP5_UV, OMAP343X_CONTROL_FUSE_OPP5_VDD1, 0xf9, 0x18, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
/* VDD2 */
|
||||
@@ -51,10 +52,10 @@ struct omap_volt_data omap34xx_vddmpu_volt_data[] = {
|
||||
#define OMAP3430_VDD_CORE_OPP3_UV 1150000
|
||||
|
||||
struct omap_volt_data omap34xx_vddcore_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP1_UV, OMAP343X_CONTROL_FUSE_OPP1_VDD2, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP2_UV, OMAP343X_CONTROL_FUSE_OPP2_VDD2, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP3_UV, OMAP343X_CONTROL_FUSE_OPP3_VDD2, 0xf9, 0x18),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP1_UV, OMAP343X_CONTROL_FUSE_OPP1_VDD2, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP2_UV, OMAP343X_CONTROL_FUSE_OPP2_VDD2, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3430_VDD_CORE_OPP3_UV, OMAP343X_CONTROL_FUSE_OPP3_VDD2, 0xf9, 0x18, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
/* 36xx */
|
||||
@@ -67,11 +68,11 @@ struct omap_volt_data omap34xx_vddcore_volt_data[] = {
|
||||
#define OMAP3630_VDD_MPU_OPP1G_UV 1375000
|
||||
|
||||
struct omap_volt_data omap36xx_vddmpu_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP50_UV, OMAP3630_CONTROL_FUSE_OPP50_VDD1, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP100_UV, OMAP3630_CONTROL_FUSE_OPP100_VDD1, 0xf9, 0x16),
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP120_UV, OMAP3630_CONTROL_FUSE_OPP120_VDD1, 0xfa, 0x23),
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP1G_UV, OMAP3630_CONTROL_FUSE_OPP1G_VDD1, 0xfa, 0x27),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP50_UV, OMAP3630_CONTROL_FUSE_OPP50_VDD1, 0xf4, 0x0c, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP100_UV, OMAP3630_CONTROL_FUSE_OPP100_VDD1, 0xf9, 0x16, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP120_UV, OMAP3630_CONTROL_FUSE_OPP120_VDD1, 0xfa, 0x23, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_MPU_OPP1G_UV, OMAP3630_CONTROL_FUSE_OPP1G_VDD1, 0xfa, 0x27, OMAP_ABB_FAST_OPP),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
/* VDD2 */
|
||||
@@ -80,9 +81,9 @@ struct omap_volt_data omap36xx_vddmpu_volt_data[] = {
|
||||
#define OMAP3630_VDD_CORE_OPP100_UV 1200000
|
||||
|
||||
struct omap_volt_data omap36xx_vddcore_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_CORE_OPP50_UV, OMAP3630_CONTROL_FUSE_OPP50_VDD2, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP3630_VDD_CORE_OPP100_UV, OMAP3630_CONTROL_FUSE_OPP100_VDD2, 0xf9, 0x16),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_CORE_OPP50_UV, OMAP3630_CONTROL_FUSE_OPP50_VDD2, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP3630_VDD_CORE_OPP100_UV, OMAP3630_CONTROL_FUSE_OPP100_VDD2, 0xf9, 0x16, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
/* OPP data */
|
||||
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
|
||||
index 2293ba2..efdbf91 100644
|
||||
--- a/arch/arm/mach-omap2/opp4xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "control.h"
|
||||
#include "omap_opp_data.h"
|
||||
#include "pm.h"
|
||||
+#include "abb.h"
|
||||
|
||||
/*
|
||||
* Structures containing OMAP4430 voltage supported and various
|
||||
@@ -37,11 +38,11 @@
|
||||
#define OMAP4430_VDD_MPU_OPPNITRO_UV 1375000
|
||||
|
||||
struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP50_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP50, 0xf4, 0x0c, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPP100_UV, OMAP44XX_CONTROL_FUSE_MPU_OPP100, 0xf9, 0x16, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPTURBO, 0xfa, 0x23, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_MPU_OPPNITRO_UV, OMAP44XX_CONTROL_FUSE_MPU_OPPNITRO, 0xfa, 0x27, OMAP_ABB_FAST_OPP),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
#define OMAP4430_VDD_IVA_OPP50_UV 1013000
|
||||
@@ -49,19 +50,19 @@ struct omap_volt_data omap44xx_vdd_mpu_volt_data[] = {
|
||||
#define OMAP4430_VDD_IVA_OPPTURBO_UV 1300000
|
||||
|
||||
struct omap_volt_data omap44xx_vdd_iva_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP50_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP50, 0xf4, 0x0c, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPP100_UV, OMAP44XX_CONTROL_FUSE_IVA_OPP100, 0xf9, 0x16, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_IVA_OPPTURBO_UV, OMAP44XX_CONTROL_FUSE_IVA_OPPTURBO, 0xfa, 0x23, OMAP_ABB_NOMINAL_OPP),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
#define OMAP4430_VDD_CORE_OPP50_UV 1025000
|
||||
#define OMAP4430_VDD_CORE_OPP100_UV 1200000
|
||||
|
||||
struct omap_volt_data omap44xx_vdd_core_volt_data[] = {
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c),
|
||||
- VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16),
|
||||
- VOLT_DATA_DEFINE(0, 0, 0, 0),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP50_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP50, 0xf4, 0x0c, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(OMAP4430_VDD_CORE_OPP100_UV, OMAP44XX_CONTROL_FUSE_CORE_OPP100, 0xf9, 0x16, OMAP_ABB_NO_LDO),
|
||||
+ VOLT_DATA_DEFINE(0, 0, 0, 0, 0),
|
||||
};
|
||||
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
|
||||
index b4c6259..2aa6c43 100644
|
||||
--- a/arch/arm/mach-omap2/voltage.h
|
||||
+++ b/arch/arm/mach-omap2/voltage.h
|
||||
@@ -105,6 +105,7 @@ struct omap_volt_data {
|
||||
u32 sr_efuse_offs;
|
||||
u8 sr_errminlimit;
|
||||
u8 vp_errgain;
|
||||
+ u32 opp_sel;
|
||||
};
|
||||
|
||||
/**
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
From 4a0f2caa6d49e185eac84e361ee4b40783ffeb16 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Thu, 21 Jul 2011 12:31:50 +0200
|
||||
Subject: [PATCH 6/8] OMAP3+: Voltage: add ABB data to voltage domains
|
||||
|
||||
Starting with OMAP36xx, some voltage domains have an ABB ldo meant to
|
||||
insure stability when that voltage domain is operating at a high OPP.
|
||||
|
||||
This patch adds struct omap_abb_instance to struct voltagedomain and
|
||||
populates the data for those voltage domains that have an ABB ldo on
|
||||
both 36xx and 44xx silicon.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/voltage.h | 1 +
|
||||
arch/arm/mach-omap2/voltagedomains3xxx_data.c | 3 +++
|
||||
arch/arm/mach-omap2/voltagedomains44xx_data.c | 3 +++
|
||||
3 files changed, 7 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
|
||||
index 2aa6c43..4fe35d7 100644
|
||||
--- a/arch/arm/mach-omap2/voltage.h
|
||||
+++ b/arch/arm/mach-omap2/voltage.h
|
||||
@@ -69,6 +69,7 @@ struct voltagedomain {
|
||||
struct omap_vc_channel *vc;
|
||||
const struct omap_vfsm_instance *vfsm;
|
||||
struct omap_vp_instance *vp;
|
||||
+ struct omap_abb_instance *abb;
|
||||
struct omap_voltdm_pmic *pmic;
|
||||
|
||||
/* VC/VP register access functions: SoC specific */
|
||||
diff --git a/arch/arm/mach-omap2/voltagedomains3xxx_data.c b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
|
||||
index b0d0ae1..cdcfbdf 100644
|
||||
--- a/arch/arm/mach-omap2/voltagedomains3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/voltagedomains3xxx_data.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "voltage.h"
|
||||
#include "vc.h"
|
||||
#include "vp.h"
|
||||
+#include "abb.h"
|
||||
|
||||
/*
|
||||
* VDD data
|
||||
@@ -90,6 +91,8 @@ void __init omap3xxx_voltagedomains_init(void)
|
||||
if (cpu_is_omap3630()) {
|
||||
omap3_voltdm_mpu.volt_data = omap36xx_vddmpu_volt_data;
|
||||
omap3_voltdm_core.volt_data = omap36xx_vddcore_volt_data;
|
||||
+
|
||||
+ omap3_voltdm_mpu.abb = &omap36xx_abb_mpu;
|
||||
} else {
|
||||
omap3_voltdm_mpu.volt_data = omap34xx_vddmpu_volt_data;
|
||||
omap3_voltdm_core.volt_data = omap34xx_vddcore_volt_data;
|
||||
diff --git a/arch/arm/mach-omap2/voltagedomains44xx_data.c b/arch/arm/mach-omap2/voltagedomains44xx_data.c
|
||||
index c4584e9..11e2458 100644
|
||||
--- a/arch/arm/mach-omap2/voltagedomains44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/voltagedomains44xx_data.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "omap_opp_data.h"
|
||||
#include "vc.h"
|
||||
#include "vp.h"
|
||||
+#include "abb.h"
|
||||
|
||||
static const struct omap_vfsm_instance omap4_vdd_mpu_vfsm = {
|
||||
.voltsetup_reg = OMAP4_PRM_VOLTSETUP_MPU_RET_SLEEP_OFFSET,
|
||||
@@ -53,6 +54,7 @@ static struct voltagedomain omap4_voltdm_mpu = {
|
||||
.vc = &omap4_vc_mpu,
|
||||
.vfsm = &omap4_vdd_mpu_vfsm,
|
||||
.vp = &omap4_vp_mpu,
|
||||
+ .abb = &omap4_abb_mpu,
|
||||
};
|
||||
|
||||
static struct voltagedomain omap4_voltdm_iva = {
|
||||
@@ -64,6 +66,7 @@ static struct voltagedomain omap4_voltdm_iva = {
|
||||
.vc = &omap4_vc_iva,
|
||||
.vfsm = &omap4_vdd_iva_vfsm,
|
||||
.vp = &omap4_vp_iva,
|
||||
+ .abb = &omap4_abb_iva,
|
||||
};
|
||||
|
||||
static struct voltagedomain omap4_voltdm_core = {
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-274
@@ -1,274 +0,0 @@
|
||||
From 35fc68e090a4f4241c7b3488fd24e82b3f839994 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Wed, 29 Jun 2011 17:25:59 -0700
|
||||
Subject: [PATCH 7/8] OMAP3+: ABB: initialization & transition functions
|
||||
|
||||
The Adaptive Body-Bias ldo can be set to bypass or Forward Body-Bias
|
||||
after voltage scaling is performed.
|
||||
|
||||
This patch implements the Adaptive Body-Bias ldo initialization routine
|
||||
and the transition sequence which is needed after a vc_bypass or
|
||||
vp_forceupdate sequence completes.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 2 +-
|
||||
arch/arm/mach-omap2/abb.c | 218 ++++++++++++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/abb.h | 5 +
|
||||
3 files changed, 224 insertions(+), 1 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap2/abb.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index 5bc306c..d0dd488 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -94,7 +94,7 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \
|
||||
|
||||
# OMAP voltage domains
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
-voltagedomain-common := voltage.o vc.o vp.o
|
||||
+voltagedomain-common := voltage.o vc.o vp.o abb.o
|
||||
obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \
|
||||
voltagedomains2xxx_data.o
|
||||
obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \
|
||||
diff --git a/arch/arm/mach-omap2/abb.c b/arch/arm/mach-omap2/abb.c
|
||||
new file mode 100644
|
||||
index 0000000..4d42b67
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/abb.c
|
||||
@@ -0,0 +1,218 @@
|
||||
+/*
|
||||
+ * OMAP Adaptive Body-Bias core
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Texas Instruments, Inc.
|
||||
+ * Mike Turquette <mturquette@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/delay.h>
|
||||
+
|
||||
+#include "abb.h"
|
||||
+#include "voltage.h"
|
||||
+
|
||||
+/*
|
||||
+ * omap_abb_set_opp - program ABB ldo based on new voltage
|
||||
+ *
|
||||
+ * @voltdm - pointer to voltage domain that just finished scaling voltage
|
||||
+ *
|
||||
+ * Look up the ABB ldo state for the new voltage that voltdm just finished
|
||||
+ * transitioning to and compare it to current ldo state. If a change is needed
|
||||
+ * then clear appropriate PRM_IRQSTATUS bit, transition ldo and then clear
|
||||
+ * PRM_IRQSTATUS bit again. Returns 0 on success, -EERROR otherwise.
|
||||
+ */
|
||||
+int omap_abb_set_opp(struct voltagedomain *voltdm)
|
||||
+{
|
||||
+ struct omap_abb_instance *abb = voltdm->abb;
|
||||
+ struct omap_volt_data *volt_data;
|
||||
+ int ret, timeout;
|
||||
+ u8 opp_sel;
|
||||
+
|
||||
+ /* fetch the ABB ldo OPP_SEL value for the new voltage */
|
||||
+ volt_data = omap_voltage_get_voltdata(voltdm, voltdm->nominal_volt);
|
||||
+
|
||||
+ if (IS_ERR_OR_NULL(volt_data))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ opp_sel = volt_data->opp_sel;
|
||||
+
|
||||
+ /* bail early if no transition is necessary */
|
||||
+ if (opp_sel == abb->_opp_sel)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* clear interrupt status */
|
||||
+ timeout = 0;
|
||||
+ while (timeout++ < ABB_TRANXDONE_TIMEOUT) {
|
||||
+ abb->common->ops->clear_tranxdone(abb->prm_irq_id);
|
||||
+
|
||||
+ ret = abb->common->ops->check_tranxdone(abb->prm_irq_id);
|
||||
+ if (!ret)
|
||||
+ break;
|
||||
+
|
||||
+ udelay(1);
|
||||
+ }
|
||||
+
|
||||
+ if (timeout>= ABB_TRANXDONE_TIMEOUT) {
|
||||
+ pr_warning("%s: vdd_%s ABB TRANXDONE timeout\n",
|
||||
+ __func__, voltdm->name);
|
||||
+ return -ETIMEDOUT;
|
||||
+ }
|
||||
+
|
||||
+ /* program next state of ABB ldo */
|
||||
+ voltdm->rmw(abb->common->opp_sel_mask,
|
||||
+ opp_sel << __ffs(abb->common->opp_sel_mask),
|
||||
+ abb->ctrl_offs);
|
||||
+
|
||||
+ /* initiate ABB ldo change */
|
||||
+ voltdm->rmw(abb->common->opp_change_mask,
|
||||
+ abb->common->opp_change_mask,
|
||||
+ abb->ctrl_offs);
|
||||
+
|
||||
+ /* clear interrupt status */
|
||||
+ timeout = 0;
|
||||
+ while (timeout++ < ABB_TRANXDONE_TIMEOUT) {
|
||||
+ abb->common->ops->clear_tranxdone(abb->prm_irq_id);
|
||||
+
|
||||
+ ret = abb->common->ops->check_tranxdone(abb->prm_irq_id);
|
||||
+ if (!ret)
|
||||
+ break;
|
||||
+
|
||||
+ udelay(1);
|
||||
+ }
|
||||
+
|
||||
+ if (timeout>= ABB_TRANXDONE_TIMEOUT) {
|
||||
+ pr_warning("%s: vdd_%s ABB TRANXDONE timeout\n",
|
||||
+ __func__, voltdm->name);
|
||||
+ return -ETIMEDOUT;
|
||||
+ }
|
||||
+
|
||||
+ /* track internal state */
|
||||
+ abb->_opp_sel = opp_sel;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * omap_abb_enable - enable ABB ldo on a particular voltage domain
|
||||
+ *
|
||||
+ * @voltdm - pointer to particular voltage domain
|
||||
+ */
|
||||
+void omap_abb_enable(struct voltagedomain *voltdm)
|
||||
+{
|
||||
+ struct omap_abb_instance *abb = voltdm->abb;
|
||||
+
|
||||
+ if (abb->enabled)
|
||||
+ return;
|
||||
+
|
||||
+ abb->enabled = true;
|
||||
+
|
||||
+ voltdm->rmw(abb->common->sr2en_mask, abb->common->sr2en_mask,
|
||||
+ abb->setup_offs);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * omap_abb_disable - disable ABB ldo on a particular voltage domain
|
||||
+ *
|
||||
+ * @voltdm - pointer to particular voltage domain
|
||||
+ *
|
||||
+ * Included for completeness. Not currently used but will be needed in the
|
||||
+ * future if ABB is converted to a loadable module.
|
||||
+ */
|
||||
+void omap_abb_disable(struct voltagedomain *voltdm)
|
||||
+{
|
||||
+ struct omap_abb_instance *abb = voltdm->abb;
|
||||
+
|
||||
+ if (!abb->enabled)
|
||||
+ return;
|
||||
+
|
||||
+ abb->enabled = false;
|
||||
+
|
||||
+ voltdm->rmw(abb->common->sr2en_mask,
|
||||
+ (0 << __ffs(abb->common->sr2en_mask)),
|
||||
+ abb->setup_offs);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * omap_abb_init - Initialize an ABB ldo instance
|
||||
+ *
|
||||
+ * @voltdm: voltage domain upon which ABB ldo resides
|
||||
+ *
|
||||
+ * Initializes an individual ABB ldo for Forward Body-Bias. FBB is used to
|
||||
+ * insure stability at higher voltages. Note that some older OMAP chips have a
|
||||
+ * Reverse Body-Bias mode meant to save power at low voltage, but that mode is
|
||||
+ * unsupported and phased out on newer chips.
|
||||
+ */
|
||||
+void __init omap_abb_init(struct voltagedomain *voltdm)
|
||||
+{
|
||||
+ struct omap_abb_instance *abb = voltdm->abb;
|
||||
+ u32 sys_clk_rate;
|
||||
+ u32 sr2_wt_cnt_val;
|
||||
+ u32 clock_cycles;
|
||||
+ u32 settling_time;
|
||||
+ u32 val;
|
||||
+
|
||||
+ if(IS_ERR_OR_NULL(abb))
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
+ * SR2_WTCNT_VALUE is the settling time for the ABB ldo after a
|
||||
+ * transition and must be programmed with the correct time at boot.
|
||||
+ * The value programmed into the register is the number of SYS_CLK
|
||||
+ * clock cycles that match a given wall time profiled for the ldo.
|
||||
+ * This value depends on:
|
||||
+ * settling time of ldo in micro-seconds (varies per OMAP family)
|
||||
+ * # of clock cycles per SYS_CLK period (varies per OMAP family)
|
||||
+ * the SYS_CLK frequency in MHz (varies per board)
|
||||
+ * The formula is:
|
||||
+ *
|
||||
+ * ldo settling time (in micro-seconds)
|
||||
+ * SR2_WTCNT_VALUE = ------------------------------------------
|
||||
+ * (# system clock cycles) * (sys_clk period)
|
||||
+ *
|
||||
+ * Put another way:
|
||||
+ *
|
||||
+ * SR2_WTCNT_VALUE = settling time / (# SYS_CLK cycles / SYS_CLK rate))
|
||||
+ *
|
||||
+ * To avoid dividing by zero multiply both "# clock cycles" and
|
||||
+ * "settling time" by 10 such that the final result is the one we want.
|
||||
+ */
|
||||
+
|
||||
+ /* convert SYS_CLK rate to MHz & prevent divide by zero */
|
||||
+ sys_clk_rate = DIV_ROUND_CLOSEST(voltdm->sys_clk.rate, 1000000);
|
||||
+ clock_cycles = abb->common->clock_cycles * 10;
|
||||
+ settling_time = abb->common->settling_time * 10;
|
||||
+
|
||||
+ /* calculate cycle rate */
|
||||
+ clock_cycles = DIV_ROUND_CLOSEST(clock_cycles, sys_clk_rate);
|
||||
+
|
||||
+ /* calulate SR2_WTCNT_VALUE */
|
||||
+ sr2_wt_cnt_val = DIV_ROUND_CLOSEST(settling_time, clock_cycles);
|
||||
+
|
||||
+ voltdm->rmw(abb->common->sr2_wtcnt_value_mask,
|
||||
+ (sr2_wt_cnt_val << __ffs(abb->common->sr2_wtcnt_value_mask)),
|
||||
+ abb->setup_offs);
|
||||
+
|
||||
+ /* allow Forward Body-Bias */
|
||||
+ voltdm->rmw(abb->common->active_fbb_sel_mask,
|
||||
+ abb->common->active_fbb_sel_mask,
|
||||
+ abb->setup_offs);
|
||||
+
|
||||
+ /* did bootloader set OPP_SEL? */
|
||||
+ val = voltdm->read(abb->ctrl_offs);
|
||||
+ val &= abb->common->opp_sel_mask;
|
||||
+ abb->_opp_sel = val >> __ffs(abb->common->opp_sel_mask);
|
||||
+
|
||||
+ /* enable the ldo if not done by bootloader */
|
||||
+ val = voltdm->read(abb->setup_offs);
|
||||
+ val &= abb->common->sr2en_mask;
|
||||
+ if (val)
|
||||
+ abb->enabled = true;
|
||||
+ else
|
||||
+ omap_abb_enable(voltdm);
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
diff --git a/arch/arm/mach-omap2/abb.h b/arch/arm/mach-omap2/abb.h
|
||||
index 74f2044..c06c7d6 100644
|
||||
--- a/arch/arm/mach-omap2/abb.h
|
||||
+++ b/arch/arm/mach-omap2/abb.h
|
||||
@@ -82,4 +82,9 @@ extern struct omap_abb_instance omap36xx_abb_mpu;
|
||||
extern struct omap_abb_instance omap4_abb_mpu;
|
||||
extern struct omap_abb_instance omap4_abb_iva;
|
||||
|
||||
+void omap_abb_init(struct voltagedomain *voltdm);
|
||||
+void omap_abb_enable(struct voltagedomain *voltdm);
|
||||
+void omap_abb_disble(struct voltagedomain *voltdm);
|
||||
+int omap_abb_set_opp(struct voltagedomain *voltdm);
|
||||
+
|
||||
#endif
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
-114
@@ -1,114 +0,0 @@
|
||||
From ee2b116a1ee82ec94108035ed1ae047d69aee215 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Turquette <mturquette@ti.com>
|
||||
Date: Thu, 21 Jul 2011 12:36:37 +0200
|
||||
Subject: [PATCH 8/8] OMAP3+: Voltage: add ABB to voltage scaling
|
||||
|
||||
Adaptive Body-Bias ldo state should be transitioned (if necessary) after
|
||||
a voltage scaling sequence completes via vc_bypass or vp_forceupdate
|
||||
methods.
|
||||
|
||||
This patch initializes the ABB ldo's as a part of the greater voltage
|
||||
initialization function and adds the ABB transition routine to both the
|
||||
vc_bypass and vp_forceupdate sequences.
|
||||
|
||||
Signed-off-by: Mike Turquette <mturquette@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/vc.c | 10 ++++++++--
|
||||
arch/arm/mach-omap2/voltage.c | 4 ++++
|
||||
arch/arm/mach-omap2/vp.c | 9 +++++++--
|
||||
3 files changed, 19 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
|
||||
index 16fa912..c5d8550 100644
|
||||
--- a/arch/arm/mach-omap2/vc.c
|
||||
+++ b/arch/arm/mach-omap2/vc.c
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "voltage.h"
|
||||
#include "vc.h"
|
||||
+#include "abb.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
#include "prm-regbits-44xx.h"
|
||||
#include "prm44xx.h"
|
||||
@@ -153,7 +154,7 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
|
||||
u32 loop_cnt = 0, retries_cnt = 0;
|
||||
u32 vc_valid, vc_bypass_val_reg, vc_bypass_value;
|
||||
u8 target_vsel, current_vsel;
|
||||
- int ret;
|
||||
+ int ret = 0;
|
||||
|
||||
ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, ¤t_vsel);
|
||||
if (ret)
|
||||
@@ -191,7 +192,12 @@ int omap_vc_bypass_scale(struct voltagedomain *voltdm,
|
||||
}
|
||||
|
||||
omap_vc_post_scale(voltdm, target_volt, target_vsel, current_vsel);
|
||||
- return 0;
|
||||
+
|
||||
+ /* transition Adaptive Body-Bias ldo */
|
||||
+ if (voltdm->abb)
|
||||
+ ret = omap_abb_set_opp(voltdm);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static void __init omap3_vfsm_init(struct voltagedomain *voltdm)
|
||||
diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
|
||||
index cebc8b1..25f8604 100644
|
||||
--- a/arch/arm/mach-omap2/voltage.c
|
||||
+++ b/arch/arm/mach-omap2/voltage.c
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include "vc.h"
|
||||
#include "vp.h"
|
||||
+#include "abb.h"
|
||||
|
||||
static LIST_HEAD(voltdm_list);
|
||||
|
||||
@@ -279,6 +280,9 @@ int __init omap_voltage_late_init(void)
|
||||
voltdm->scale = omap_vp_forceupdate_scale;
|
||||
omap_vp_init(voltdm);
|
||||
}
|
||||
+
|
||||
+ if (voltdm->abb)
|
||||
+ omap_abb_init(voltdm);
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
|
||||
index 66bd700..886be89 100644
|
||||
--- a/arch/arm/mach-omap2/vp.c
|
||||
+++ b/arch/arm/mach-omap2/vp.c
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "voltage.h"
|
||||
#include "vp.h"
|
||||
+#include "abb.h"
|
||||
#include "prm-regbits-34xx.h"
|
||||
#include "prm-regbits-44xx.h"
|
||||
#include "prm44xx.h"
|
||||
@@ -116,7 +117,7 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
|
||||
struct omap_vp_instance *vp = voltdm->vp;
|
||||
u32 vpconfig;
|
||||
u8 target_vsel, current_vsel;
|
||||
- int ret, timeout = 0;
|
||||
+ int ret = 0, timeout = 0;
|
||||
|
||||
ret = omap_vc_pre_scale(voltdm, target_volt, &target_vsel, ¤t_vsel);
|
||||
if (ret)
|
||||
@@ -178,7 +179,11 @@ int omap_vp_forceupdate_scale(struct voltagedomain *voltdm,
|
||||
/* Clear force bit */
|
||||
voltdm->write(vpconfig, vp->vpconfig);
|
||||
|
||||
- return 0;
|
||||
+ /* transition Adaptive Body-Bias LDO */
|
||||
+ if (voltdm->abb)
|
||||
+ ret = omap_abb_set_opp(voltdm);
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
1.6.6.1
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From 174f636d95d1f6aa6fc6ba3e81282fb49b0feecd Mon Sep 17 00:00:00 2001
|
||||
From: Keerthy <j-keerthy@ti.com>
|
||||
Date: Wed, 4 May 2011 01:14:50 +0530
|
||||
Subject: [PATCH 1/2] Enabling Hwmon driver for twl4030-madc
|
||||
|
||||
Signed-off-by: Keerthy <j-keerthy@ti.com>
|
||||
---
|
||||
drivers/mfd/twl-core.c | 15 +++++++++++++++
|
||||
1 files changed, 15 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
|
||||
index f82413a..e39dbed 100644
|
||||
--- a/drivers/mfd/twl-core.c
|
||||
+++ b/drivers/mfd/twl-core.c
|
||||
@@ -83,6 +83,13 @@
|
||||
#define twl_has_madc() false
|
||||
#endif
|
||||
|
||||
+#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\
|
||||
+ defined(CONFIG_SENSORS_TWL4030_MADC_MODULE)
|
||||
+#define twl_has_madc_hwmon() true
|
||||
+#else
|
||||
+#define twl_has_madc_hwmon() false
|
||||
+#endif
|
||||
+
|
||||
#ifdef CONFIG_TWL4030_POWER
|
||||
#define twl_has_power() true
|
||||
#else
|
||||
@@ -669,6 +676,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
|
||||
return PTR_ERR(child);
|
||||
}
|
||||
|
||||
+if (twl_has_madc_hwmon()) {
|
||||
+ child = add_child(2, "twl4030_madc_hwmon",
|
||||
+ NULL, 0,
|
||||
+ true, pdata->irq_base + MADC_INTR_OFFSET, 0);
|
||||
+ if (IS_ERR(child))
|
||||
+ return PTR_ERR(child);
|
||||
+ }
|
||||
+
|
||||
if (twl_has_rtc()) {
|
||||
/*
|
||||
* REVISIT platform_data here currently might expose the
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From f4aed769e9e59998f44447e7309e192573e6fac6 Mon Sep 17 00:00:00 2001
|
||||
From: Steve Sakoman <steve@sakoman.com>
|
||||
Date: Sat, 23 Jan 2010 06:26:54 -0800
|
||||
Subject: [PATCH 2/2] mfd: twl-core: enable madc clock
|
||||
|
||||
Now that the madc driver has been merged it is also necessary to enable the clock to the madc block
|
||||
|
||||
Signed-off-by: Steve Sakoman <steve@sakoman.com>
|
||||
---
|
||||
drivers/mfd/twl-core.c | 8 ++++++++
|
||||
include/linux/i2c/twl.h | 1 +
|
||||
2 files changed, 9 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
|
||||
index e39dbed..018ee53 100644
|
||||
--- a/drivers/mfd/twl-core.c
|
||||
+++ b/drivers/mfd/twl-core.c
|
||||
@@ -217,6 +217,11 @@
|
||||
|
||||
/* Few power values */
|
||||
#define R_CFG_BOOT 0x05
|
||||
+#define R_GPBR1 0x0C
|
||||
+
|
||||
+/* MADC clock values for R_GPBR1 */
|
||||
+#define MADC_HFCLK_EN 0x80
|
||||
+#define DEFAULT_MADC_CLK_EN 0x10
|
||||
|
||||
/* some fields in R_CFG_BOOT */
|
||||
#define HFCLK_FREQ_19p2_MHZ (1 << 0)
|
||||
@@ -1152,6 +1157,9 @@ static void clocks_init(struct device *dev,
|
||||
|
||||
e |= unprotect_pm_master();
|
||||
/* effect->MADC+USB ck en */
|
||||
+ if (twl_has_madc())
|
||||
+ e |= twl_i2c_write_u8(TWL_MODULE_INTBR,
|
||||
+ MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1);
|
||||
e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT);
|
||||
e |= protect_pm_master();
|
||||
|
||||
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
|
||||
index ba4f886..6802efc 100644
|
||||
--- a/include/linux/i2c/twl.h
|
||||
+++ b/include/linux/i2c/twl.h
|
||||
@@ -74,6 +74,7 @@
|
||||
|
||||
#define TWL_MODULE_USB TWL4030_MODULE_USB
|
||||
#define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE
|
||||
+#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR
|
||||
#define TWL_MODULE_PIH TWL4030_MODULE_PIH
|
||||
#define TWL_MODULE_MADC TWL4030_MODULE_MADC
|
||||
#define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 6f92ab6de9d8daeb575949bbbcbc7bcdcebc60af Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 5 Jan 2012 11:42:35 -0800
|
||||
Subject: [PATCH] compiler.h: Undef before redefining __attribute_const__
|
||||
|
||||
This is required to avoid warnings like
|
||||
util/include/linux/compiler.h:8:0: error: "__attribute_const__" redefined [-Werror]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
tools/perf/util/include/linux/compiler.h | 4 +++-
|
||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
||||
|
||||
--- a/tools/perf/util/include/linux/compiler.h
|
||||
+++ b/tools/perf/util/include/linux/compiler.h
|
||||
@@ -4,9 +4,11 @@
|
||||
#ifndef __always_inline
|
||||
#define __always_inline inline
|
||||
#endif
|
||||
+#undef __user
|
||||
#define __user
|
||||
+#undef __attribute_const__
|
||||
#define __attribute_const__
|
||||
-
|
||||
+#undef __used
|
||||
#define __used __attribute__((__unused__))
|
||||
|
||||
#endif
|
||||
-43
@@ -1,43 +0,0 @@
|
||||
From c15f217f7d07c460763a092f31f61b1975a18563 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Fri, 16 Mar 2012 11:19:09 -0500
|
||||
Subject: [PATCH 2/2] OMAP2+: OPP: allow OPP enumeration to continue if device is not present
|
||||
|
||||
On platforms such as OMAP3, certain variants may not have IVA, SGX
|
||||
or some specific component. We currently have a check to aid fixing
|
||||
wrong population of OPP entries for issues such as typos. This however
|
||||
causes a conflict with valid requirement where the SoC variant does
|
||||
not actually have the module present.
|
||||
|
||||
So, reduce the severity of the print to a debug statement and skip
|
||||
registering that specific OPP, but continue down the list.
|
||||
|
||||
Reported-by: Steve Sakoman <steve@sakoman.com>
|
||||
Reported-by: Maximilian Schwerin <mvs@tigris.de>
|
||||
Acked-by: Steve Sakoman <steve@sakoman.com>
|
||||
Tested-by: Maximilian Schwerin <mvs@tigris.de>
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/opp.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c
|
||||
index ab8b35b..f111b82 100644
|
||||
--- a/arch/arm/mach-omap2/opp.c
|
||||
+++ b/arch/arm/mach-omap2/opp.c
|
||||
@@ -64,10 +64,10 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
|
||||
}
|
||||
oh = omap_hwmod_lookup(opp_def->hwmod_name);
|
||||
if (!oh || !oh->od) {
|
||||
- pr_warn("%s: no hwmod or odev for %s, [%d] "
|
||||
+ pr_debug("%s: no hwmod or odev for %s, [%d] "
|
||||
"cannot add OPPs.\n", __func__,
|
||||
opp_def->hwmod_name, i);
|
||||
- return -EINVAL;
|
||||
+ continue;
|
||||
}
|
||||
dev = &oh->od->pdev.dev;
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
From 44ab86140417f173835e19bed62d6832023f2914 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Wed, 17 Aug 2011 16:02:55 +0200
|
||||
Subject: [PATCH] OMAP: Fix linking error in twl-common.c for OMAP2/3/4 only builds
|
||||
|
||||
Commit b22f954 (OMAP4: Move common twl6030 configuration to twl-common)
|
||||
caused compile failures for code for OMAP arch which is not selected by
|
||||
the config.
|
||||
|
||||
Fixes issues like:
|
||||
With CONFIG_ARCH_OMAP3=y and CONFIG_ARCH_OMAP4=n, I'm getting this:
|
||||
|
||||
arch/arm/mach-omap2/built-in.o:(.data+0xf99c): undefined reference to `omap4430_phy_init'
|
||||
arch/arm/mach-omap2/built-in.o:(.data+0xf9a0): undefined reference to `omap4430_phy_exit'
|
||||
arch/arm/mach-omap2/built-in.o:(.data+0xf9a4): undefined reference to `omap4430_phy_power'
|
||||
arch/arm/mach-omap2/built-in.o:(.data+0xf9a8): undefined reference to `omap4430_phy_set_clk'
|
||||
arch/arm/mach-omap2/built-in.o:(.data+0xf9ac): undefined reference to `omap4430_phy_suspend'
|
||||
|
||||
Fix the problem by moving the code to ifdef sections for omap3 and omap4.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
[tony@atomide.com: updated comments]
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/twl-common.c | 77 ++++++++++++++++++++------------------
|
||||
1 files changed, 41 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
|
||||
index 3aaa46f..58409c0 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.c
|
||||
+++ b/arch/arm/mach-omap2/twl-common.c
|
||||
@@ -48,14 +48,7 @@ void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
|
||||
}
|
||||
|
||||
-static struct twl4030_usb_data omap4_usb_pdata = {
|
||||
- .phy_init = omap4430_phy_init,
|
||||
- .phy_exit = omap4430_phy_exit,
|
||||
- .phy_power = omap4430_phy_power,
|
||||
- .phy_set_clock = omap4430_phy_set_clk,
|
||||
- .phy_suspend = omap4430_phy_suspend,
|
||||
-};
|
||||
-
|
||||
+#if defined(CONFIG_ARCH_OMAP3)
|
||||
static struct twl4030_usb_data omap3_usb_pdata = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
};
|
||||
@@ -122,6 +115,45 @@ static struct regulator_init_data omap3_vpll2_idata = {
|
||||
.consumer_supplies = omap3_vpll2_supplies,
|
||||
};
|
||||
|
||||
+void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
+ u32 pdata_flags, u32 regulators_flags)
|
||||
+{
|
||||
+ if (!pmic_data->irq_base)
|
||||
+ pmic_data->irq_base = TWL4030_IRQ_BASE;
|
||||
+ if (!pmic_data->irq_end)
|
||||
+ pmic_data->irq_end = TWL4030_IRQ_END;
|
||||
+
|
||||
+ /* Common platform data configurations */
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
|
||||
+ pmic_data->usb = &omap3_usb_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
|
||||
+ pmic_data->bci = &omap3_bci_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
|
||||
+ pmic_data->madc = &omap3_madc_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
|
||||
+ pmic_data->codec = &omap3_codec_pdata;
|
||||
+
|
||||
+ /* Common regulator configurations */
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
|
||||
+ pmic_data->vdac = &omap3_vdac_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
|
||||
+ pmic_data->vpll2 = &omap3_vpll2_idata;
|
||||
+}
|
||||
+#endif /* CONFIG_ARCH_OMAP3 */
|
||||
+
|
||||
+#if defined(CONFIG_ARCH_OMAP4)
|
||||
+static struct twl4030_usb_data omap4_usb_pdata = {
|
||||
+ .phy_init = omap4430_phy_init,
|
||||
+ .phy_exit = omap4430_phy_exit,
|
||||
+ .phy_power = omap4430_phy_power,
|
||||
+ .phy_set_clock = omap4430_phy_set_clk,
|
||||
+ .phy_suspend = omap4430_phy_suspend,
|
||||
+};
|
||||
+
|
||||
static struct regulator_init_data omap4_vdac_idata = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
@@ -274,31 +306,4 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
pmic_data->clk32kg = &omap4_clk32kg_idata;
|
||||
}
|
||||
|
||||
-void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
- u32 pdata_flags, u32 regulators_flags)
|
||||
-{
|
||||
- if (!pmic_data->irq_base)
|
||||
- pmic_data->irq_base = TWL4030_IRQ_BASE;
|
||||
- if (!pmic_data->irq_end)
|
||||
- pmic_data->irq_end = TWL4030_IRQ_END;
|
||||
-
|
||||
- /* Common platform data configurations */
|
||||
- if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
|
||||
- pmic_data->usb = &omap3_usb_pdata;
|
||||
-
|
||||
- if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
|
||||
- pmic_data->bci = &omap3_bci_pdata;
|
||||
-
|
||||
- if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
|
||||
- pmic_data->madc = &omap3_madc_pdata;
|
||||
-
|
||||
- if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
|
||||
- pmic_data->codec = &omap3_codec_pdata;
|
||||
-
|
||||
- /* Common regulator configurations */
|
||||
- if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
|
||||
- pmic_data->vdac = &omap3_vdac_idata;
|
||||
-
|
||||
- if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
|
||||
- pmic_data->vpll2 = &omap3_vpll2_idata;
|
||||
-}
|
||||
+#endif /* CONFIG_ARCH_OMAP4 */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
# (c) 2009 - 2012 Koen Kooi <koen@dominion.thruhere.net>
|
||||
# This script will take a set of directories with patches and make a git tree out of it
|
||||
# After all the patches are applied it will output a SRC_URI fragment you can copy/paste into a recipe
|
||||
set -e
|
||||
|
||||
TAG="v3.0.17"
|
||||
EXTRATAG=""
|
||||
PATCHPATH=$(dirname $0)
|
||||
|
||||
git am --abort || echo "Do you need to make sure the patches apply cleanly first?"
|
||||
git reset --hard ${TAG}
|
||||
rm export -rf
|
||||
|
||||
previous=${TAG}
|
||||
PATCHSET="pm-wip/voltdm pm-wip/cpufreq beagle madc sakoman sgx ulcd omap4 misc usb"
|
||||
|
||||
# apply patches
|
||||
for patchset in ${PATCHSET} ; do
|
||||
git am $PATCHPATH/$patchset/*
|
||||
git tag "${TAG}-${patchset}${EXTRATAG}" -f
|
||||
done
|
||||
|
||||
# export patches and output SRC_URI for them
|
||||
for patchset in ${PATCHSET} ; do
|
||||
mkdir export/$patchset -p
|
||||
( cd export/$patchset && git format-patch ${previous}..${TAG}-${patchset}${EXTRATAG} >& /dev/null && for i in *.patch ; do echo " file://${patchset}/$i \\" ; done )
|
||||
previous=${TAG}-${patchset}${EXTRATAG}
|
||||
done
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
From 3dfeff8f9ad8fa7e6e434eb4b450a11ab79131da Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 25 May 2011 00:43:26 -0700
|
||||
Subject: [PATCH 01/19] PM: OPP: introduce function to free cpufreq table
|
||||
|
||||
cpufreq table allocated by opp_init_cpufreq_table is better
|
||||
freed by OPP layer itself. This allows future modifications to
|
||||
the table handling to be transparent to the users.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Acked-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
Documentation/power/opp.txt | 2 ++
|
||||
drivers/base/power/opp.c | 17 +++++++++++++++++
|
||||
include/linux/opp.h | 8 ++++++++
|
||||
3 files changed, 27 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt
|
||||
index 5ae70a12..3035d00 100644
|
||||
--- a/Documentation/power/opp.txt
|
||||
+++ b/Documentation/power/opp.txt
|
||||
@@ -321,6 +321,8 @@ opp_init_cpufreq_table - cpufreq framework typically is initialized with
|
||||
addition to CONFIG_PM as power management feature is required to
|
||||
dynamically scale voltage and frequency in a system.
|
||||
|
||||
+opp_free_cpufreq_table - Free up the table allocated by opp_init_cpufreq_table
|
||||
+
|
||||
7. Data Structures
|
||||
==================
|
||||
Typically an SoC contains multiple voltage domains which are variable. Each
|
||||
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c
|
||||
index 56a6899..5cc1232 100644
|
||||
--- a/drivers/base/power/opp.c
|
||||
+++ b/drivers/base/power/opp.c
|
||||
@@ -625,4 +625,21 @@ int opp_init_cpufreq_table(struct device *dev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+/**
|
||||
+ * opp_free_cpufreq_table() - free the cpufreq table
|
||||
+ * @dev: device for which we do this operation
|
||||
+ * @table: table to free
|
||||
+ *
|
||||
+ * Free up the table allocated by opp_init_cpufreq_table
|
||||
+ */
|
||||
+void opp_free_cpufreq_table(struct device *dev,
|
||||
+ struct cpufreq_frequency_table **table)
|
||||
+{
|
||||
+ if (!table)
|
||||
+ return;
|
||||
+
|
||||
+ kfree(*table);
|
||||
+ *table = NULL;
|
||||
+}
|
||||
#endif /* CONFIG_CPU_FREQ */
|
||||
diff --git a/include/linux/opp.h b/include/linux/opp.h
|
||||
index 5449945..7020e97 100644
|
||||
--- a/include/linux/opp.h
|
||||
+++ b/include/linux/opp.h
|
||||
@@ -94,12 +94,20 @@ static inline int opp_disable(struct device *dev, unsigned long freq)
|
||||
#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_PM_OPP)
|
||||
int opp_init_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table **table);
|
||||
+void opp_free_cpufreq_table(struct device *dev,
|
||||
+ struct cpufreq_frequency_table **table);
|
||||
#else
|
||||
static inline int opp_init_cpufreq_table(struct device *dev,
|
||||
struct cpufreq_frequency_table **table)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
+static inline
|
||||
+void opp_free_cpufreq_table(struct device *dev,
|
||||
+ struct cpufreq_frequency_table **table)
|
||||
+{
|
||||
+}
|
||||
#endif /* CONFIG_CPU_FREQ */
|
||||
|
||||
#endif /* __LINUX_OPP_H__ */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
From bc2810462308f15ff90841453961200bf90a814d Mon Sep 17 00:00:00 2001
|
||||
From: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
|
||||
Date: Wed, 11 Aug 2010 17:02:43 -0700
|
||||
Subject: [PATCH 02/19] OMAP: CPUfreq: ensure driver initializes after cpufreq framework and governors
|
||||
|
||||
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/plat-omap/cpu-omap.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
index da4f68d..cd09d4b 100644
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ b/arch/arm/plat-omap/cpu-omap.c
|
||||
@@ -160,7 +160,7 @@ static int __init omap_cpufreq_init(void)
|
||||
return cpufreq_register_driver(&omap_driver);
|
||||
}
|
||||
|
||||
-arch_initcall(omap_cpufreq_init);
|
||||
+late_initcall(omap_cpufreq_init);
|
||||
|
||||
/*
|
||||
* if ever we want to remove this, upon cleanup call:
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From be4be1a11360222f0b0add1dadfeaf76af199990 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Date: Wed, 11 Aug 2010 17:05:38 -0700
|
||||
Subject: [PATCH 03/19] OMAP: CPUfreq: ensure policy is fully initialized
|
||||
|
||||
Ensure policy min/max/cur values are initialized when OMAP
|
||||
CPUfreq driver starts.
|
||||
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/plat-omap/cpu-omap.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
index cd09d4b..1b36664 100644
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ b/arch/arm/plat-omap/cpu-omap.c
|
||||
@@ -126,6 +126,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
VERY_HI_RATE) / 1000;
|
||||
}
|
||||
|
||||
+ policy->min = policy->cpuinfo.min_freq;
|
||||
+ policy->max = policy->cpuinfo.max_freq;
|
||||
+ policy->cur = omap_getspeed(0);
|
||||
+
|
||||
/* FIXME: what's the actual transition time? */
|
||||
policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-264
@@ -1,264 +0,0 @@
|
||||
From fcd436dfb1c2d8e4866001700a5bba2a1d4079aa Mon Sep 17 00:00:00 2001
|
||||
From: Rajendra Nayak <rnayak@ti.com>
|
||||
Date: Mon, 10 Nov 2008 17:00:25 +0530
|
||||
Subject: [PATCH 04/19] OMAP3 PM: CPUFreq driver for OMAP3
|
||||
|
||||
CPUFreq driver for OMAP3
|
||||
|
||||
With additional fixes and cleanups from Tero Kristo:
|
||||
- Fix rate calculation bug in omap3_select_table_rate
|
||||
- Refreshed DVFS VDD1 control against latest clock fw
|
||||
|
||||
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
OMAP3: PM: CPUFreq: Fix omap_getspeed.
|
||||
|
||||
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
|
||||
|
||||
Make sure omap cpufreq driver initializes after cpufreq framework and governors
|
||||
|
||||
Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
|
||||
|
||||
merge: CPUFreq: remove obsolete funcs
|
||||
|
||||
OMAP3 clock: Update cpufreq driver
|
||||
|
||||
This patch removes all refrences to virtual clock
|
||||
nodes in CPUFreq driver.
|
||||
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
|
||||
Signed-off-by: Jean Pihet <jpihet@mvista.com>
|
||||
|
||||
PM: Prevent direct cpufreq scaling during initialization
|
||||
|
||||
It is seen that the OMAP specific cpufreq initialization code tries to
|
||||
scale the MPU frequency to the highest possible without taking care of
|
||||
the voltage level. On power on reset the power IC does not provide the
|
||||
necessary voltage for the highest available MPU frequency (that would
|
||||
satisfy all Si families). This potentially is an window of opportunity
|
||||
for things to go wrong.
|
||||
|
||||
Signed-off-by: Romit Dasgupta <romit@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
||||
OMAP3: PM: enable 600MHz (overdrive) OPP
|
||||
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
||||
omap3: introduce cpufreq
|
||||
|
||||
OMAP OPP layer functions now have dependencies of CONFIG_CPU_FREQ only.
|
||||
|
||||
With this patch, omap opp layer now has its compilation flags
|
||||
bound to CONFIG_CPU_FREQ. Also its code has been removed from pm34xx.c.
|
||||
|
||||
A new file has been created to contain cpu freq code related to
|
||||
OMAP3: cpufreq34xx.c
|
||||
|
||||
OMAP34xx and OMAP36xx family OPPs are made available
|
||||
|
||||
Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Signed-off-by: Romit Dasgupta <romit@ti.com>
|
||||
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
|
||||
|
||||
omap3: cpufreq: allow default opp table init
|
||||
|
||||
For board files which choose to override the defaults, the existing
|
||||
mechanism will work, for boards that would like to work with defaults,
|
||||
allow init_common_hw to call init_opp_table to initialize if not
|
||||
already initialized. this will allow all omap boards which have opp
|
||||
tables predefined for a silicon to use the same.
|
||||
|
||||
Originally reported for overo:
|
||||
http://marc.info/?t=127265269400004&r=1&w=2
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Reported-by: Peter Tseng <tsenpet09@gmail.com>
|
||||
Cc: Cliff Brake <cliff.brake@gmail.com>
|
||||
Cc: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
||||
OMAP2: update OPP data to be device based
|
||||
|
||||
Cc: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
||||
OMAP3: CPUfreq: update to device-based OPP API
|
||||
|
||||
Update usage of OPP API to use new device-based API. This requires
|
||||
getting the 'struct device' for the MPU and using that with the OPP
|
||||
API.
|
||||
|
||||
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
|
||||
omap3: opp: make independent of cpufreq
|
||||
|
||||
Make opp3xx data which is registered with the opp layer
|
||||
dependent purely on CONFIG_PM as opp layer and pm.c users
|
||||
are CONFIG_PM dependent not cpufreq dependent.
|
||||
so we rename the data definition to opp3xxx_data.c (inline with what
|
||||
we have for omap2), also move the build definition to be under
|
||||
the existing CONFIG_PM build instead of CPUFREQ.
|
||||
|
||||
Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
|
||||
Cc: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Cc: Rajendra Nayak <rnayak@ti.com>
|
||||
Cc: Sanjeev Premi <premi@ti.com>
|
||||
Cc: Thara Gopinath <thara@ti.com>
|
||||
Cc: Tony Lindgren <tony@atomide.com>
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/clock.h | 14 +++++++++++++-
|
||||
arch/arm/mach-omap2/clock34xx.c | 2 ++
|
||||
arch/arm/plat-omap/cpu-omap.c | 34 +++++++++++++++++++++++++++++++---
|
||||
3 files changed, 46 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
|
||||
index 48ac568..8bad1c6 100644
|
||||
--- a/arch/arm/mach-omap2/clock.h
|
||||
+++ b/arch/arm/mach-omap2/clock.h
|
||||
@@ -144,7 +144,9 @@ extern const struct clksel_rate gpt_sys_rates[];
|
||||
extern const struct clksel_rate gfx_l3_rates[];
|
||||
extern const struct clksel_rate dsp_ick_rates[];
|
||||
|
||||
-#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ)
|
||||
+#ifdef CONFIG_CPU_FREQ
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP2
|
||||
extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
#else
|
||||
@@ -152,6 +154,16 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
|
||||
#define omap2_clk_exit_cpufreq_table 0
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ARCH_OMAP3
|
||||
+extern void omap3_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
+extern void omap3_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
+#else
|
||||
+#define omap3_clk_init_cpufreq_table 0
|
||||
+#define omap3_clk_exit_cpufreq_table 0
|
||||
+#endif
|
||||
+
|
||||
+#endif /* CONFIG_CPU_FREQ */
|
||||
+
|
||||
extern const struct clkops clkops_omap2_iclk_dflt_wait;
|
||||
extern const struct clkops clkops_omap2_iclk_dflt;
|
||||
extern const struct clkops clkops_omap2_iclk_idle_only;
|
||||
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
|
||||
index 1fc96b9..119e135 100644
|
||||
--- a/arch/arm/mach-omap2/clock34xx.c
|
||||
+++ b/arch/arm/mach-omap2/clock34xx.c
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/cpufreq.h>
|
||||
|
||||
#include <plat/clock.h>
|
||||
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
index 1b36664..f0f9430 100644
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ b/arch/arm/plat-omap/cpu-omap.c
|
||||
@@ -8,6 +8,10 @@
|
||||
*
|
||||
* Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
|
||||
*
|
||||
+ * Copyright (C) 2007-2008 Texas Instruments, Inc.
|
||||
+ * Updated to support OMAP3
|
||||
+ * Rajendra Nayak <rnayak@ti.com>
|
||||
+ *
|
||||
* 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.
|
||||
@@ -26,12 +30,19 @@
|
||||
#include <plat/clock.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
+#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
+#include <plat/omap-pm.h>
|
||||
+#include <plat/opp.h>
|
||||
+#endif
|
||||
+
|
||||
#define VERY_HI_RATE 900000000
|
||||
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
#define MPU_CLK "mpu"
|
||||
+#elif CONFIG_ARCH_OMAP3
|
||||
+#define MPU_CLK "arm_fck"
|
||||
#else
|
||||
#define MPU_CLK "virt_prcm_set"
|
||||
#endif
|
||||
@@ -73,7 +84,13 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
unsigned int target_freq,
|
||||
unsigned int relation)
|
||||
{
|
||||
+#ifdef CONFIG_ARCH_OMAP1
|
||||
struct cpufreq_freqs freqs;
|
||||
+#endif
|
||||
+#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
+ unsigned long freq;
|
||||
+ struct device *mpu_dev = omap2_get_mpuss_device();
|
||||
+#endif
|
||||
int ret = 0;
|
||||
|
||||
/* Ensure desired rate is within allowed range. Some govenors
|
||||
@@ -83,13 +100,13 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
if (target_freq > policy->max)
|
||||
target_freq = policy->max;
|
||||
|
||||
+#ifdef CONFIG_ARCH_OMAP1
|
||||
freqs.old = omap_getspeed(0);
|
||||
freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
freqs.cpu = 0;
|
||||
|
||||
if (freqs.old == freqs.new)
|
||||
return ret;
|
||||
-
|
||||
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
|
||||
@@ -97,7 +114,11 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
#endif
|
||||
ret = clk_set_rate(mpu_clk, freqs.new * 1000);
|
||||
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
-
|
||||
+#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
+ freq = target_freq * 1000;
|
||||
+ if (opp_find_freq_ceil(mpu_dev, &freq))
|
||||
+ omap_pm_cpu_set_freq(freq);
|
||||
+#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -114,7 +135,14 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
|
||||
policy->cur = policy->min = policy->max = omap_getspeed(0);
|
||||
|
||||
- clk_init_cpufreq_table(&freq_table);
|
||||
+ if (!cpu_is_omap34xx()) {
|
||||
+ clk_init_cpufreq_table(&freq_table);
|
||||
+ } else {
|
||||
+ struct device *mpu_dev = omap2_get_mpuss_device();
|
||||
+
|
||||
+ opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
+ }
|
||||
+
|
||||
if (freq_table) {
|
||||
result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
if (!result)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 62275cbaac608a17fe5ff0437e0950667927e5e8 Mon Sep 17 00:00:00 2001
|
||||
From: Silesh C V <silesh@ti.com>
|
||||
Date: Wed, 29 Sep 2010 14:52:54 +0530
|
||||
Subject: [PATCH 05/19] OMAP: PM: CPUFREQ: Fix conditional compilation
|
||||
|
||||
Fix conditional compilation. A conditional expresiion
|
||||
should follow "#elif", in this case #elif clause should
|
||||
check whether CONFIG_ARCH_OMAP3 is defined or not
|
||||
(ie. defined(CONFIG_ARCH_OMAP3)) rather than checking for
|
||||
the value of the macro.
|
||||
|
||||
Signed-off-by: Silesh C V <silesh@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/plat-omap/cpu-omap.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
index f0f9430..c3ac065 100644
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ b/arch/arm/plat-omap/cpu-omap.c
|
||||
@@ -41,7 +41,7 @@ static struct cpufreq_frequency_table *freq_table;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
#define MPU_CLK "mpu"
|
||||
-#elif CONFIG_ARCH_OMAP3
|
||||
+#elif defined(CONFIG_ARCH_OMAP3)
|
||||
#define MPU_CLK "arm_fck"
|
||||
#else
|
||||
#define MPU_CLK "virt_prcm_set"
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-34
@@ -1,34 +0,0 @@
|
||||
From ca2d4d46267668daccc156084f8ad6e74a52f392 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Hilman <khilman@deeprootsystems.com>
|
||||
Date: Tue, 16 Nov 2010 11:48:41 -0800
|
||||
Subject: [PATCH 06/19] cpufreq: fixup after new OPP layer merged
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/plat-omap/cpu-omap.c | 3 ++-
|
||||
1 files changed, 2 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
index c3ac065..9cd2709 100644
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ b/arch/arm/plat-omap/cpu-omap.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
+#include <linux/opp.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <plat/clock.h>
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
#include <plat/omap-pm.h>
|
||||
-#include <plat/opp.h>
|
||||
+#include <plat/common.h>
|
||||
#endif
|
||||
|
||||
#define VERY_HI_RATE 900000000
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-673
@@ -1,673 +0,0 @@
|
||||
From 972aa97a8a36946ebe2274e27c317e524de2cd5c Mon Sep 17 00:00:00 2001
|
||||
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Date: Mon, 14 Mar 2011 17:08:48 +0530
|
||||
Subject: [PATCH 07/19] OMAP: cpufreq: Split OMAP1 and OMAP2PLUS CPUfreq drivers.
|
||||
|
||||
This patch is an attempt to cleanup the #ifdeferry in the
|
||||
omap CPUfreq drivers.
|
||||
|
||||
The split betwenn OMAP1 and OMAP2PLUS is logical because
|
||||
- OMAP1 doesn't support opp layer.
|
||||
- OMAP1 build is seperate from omap2plus.
|
||||
|
||||
Includes minor header/copyright updates reported by Todd Poynor.
|
||||
|
||||
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Cc: Kevin Hilman <khilman@ti.com>
|
||||
Cc: Vishwanath BS <vishwanath.bs@ti.com>
|
||||
Cc: Todd Poynor <toddpoynor@google.com>
|
||||
Cc: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap1/Makefile | 3 +
|
||||
arch/arm/mach-omap1/omap1-cpufreq.c | 175 ++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/Makefile | 3 +
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 201 ++++++++++++++++++++++++++++++
|
||||
arch/arm/plat-omap/Makefile | 1 -
|
||||
arch/arm/plat-omap/cpu-omap.c | 204 -------------------------------
|
||||
6 files changed, 382 insertions(+), 205 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap1/omap1-cpufreq.c
|
||||
create mode 100644 arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
delete mode 100644 arch/arm/plat-omap/cpu-omap.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
|
||||
index 5b114d1..9600410 100644
|
||||
--- a/arch/arm/mach-omap1/Makefile
|
||||
+++ b/arch/arm/mach-omap1/Makefile
|
||||
@@ -10,6 +10,9 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
|
||||
|
||||
obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
|
||||
|
||||
+# CPUFREQ driver
|
||||
+obj-$(CONFIG_CPU_FREQ) += omap1-cpufreq.o
|
||||
+
|
||||
# Power Management
|
||||
obj-$(CONFIG_PM) += pm.o sleep.o
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/omap1-cpufreq.c b/arch/arm/mach-omap1/omap1-cpufreq.c
|
||||
new file mode 100644
|
||||
index 0000000..7c5216e
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap1/omap1-cpufreq.c
|
||||
@@ -0,0 +1,175 @@
|
||||
+/*
|
||||
+ * OMAP1 cpufreq driver
|
||||
+ *
|
||||
+ * CPU frequency scaling for OMAP
|
||||
+ *
|
||||
+ * Copyright (C) 2005 Nokia Corporation
|
||||
+ * Written by Tony Lindgren <tony@atomide.com>
|
||||
+ *
|
||||
+ * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
|
||||
+ *
|
||||
+ * Copyright (C) 2007-2008 Texas Instruments, Inc.
|
||||
+ * Rajendra Nayak <rnayak@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/cpufreq.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/opp.h>
|
||||
+
|
||||
+#include <asm/system.h>
|
||||
+
|
||||
+#include <plat/clock.h>
|
||||
+#include <plat/omap-pm.h>
|
||||
+
|
||||
+#include <mach/hardware.h>
|
||||
+
|
||||
+#define VERY_HI_RATE 900000000
|
||||
+
|
||||
+static struct cpufreq_frequency_table *freq_table;
|
||||
+static struct clk *mpu_clk;
|
||||
+
|
||||
+static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ if (freq_table)
|
||||
+ return cpufreq_frequency_table_verify(policy, freq_table);
|
||||
+
|
||||
+ if (policy->cpu)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
+ policy->cpuinfo.max_freq);
|
||||
+
|
||||
+ policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
|
||||
+ policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
|
||||
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
+ policy->cpuinfo.max_freq);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int omap_getspeed(unsigned int cpu)
|
||||
+{
|
||||
+ unsigned long rate;
|
||||
+
|
||||
+ if (cpu)
|
||||
+ return 0;
|
||||
+
|
||||
+ rate = clk_get_rate(mpu_clk) / 1000;
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static int omap_target(struct cpufreq_policy *policy,
|
||||
+ unsigned int target_freq,
|
||||
+ unsigned int relation)
|
||||
+{
|
||||
+ struct cpufreq_freqs freqs;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ /* Ensure desired rate is within allowed range. Some govenors
|
||||
+ * (ondemand) will just pass target_freq=0 to get the minimum. */
|
||||
+ if (target_freq < policy->min)
|
||||
+ target_freq = policy->min;
|
||||
+ if (target_freq > policy->max)
|
||||
+ target_freq = policy->max;
|
||||
+
|
||||
+ freqs.old = omap_getspeed(0);
|
||||
+ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
+ freqs.cpu = 0;
|
||||
+
|
||||
+ if (freqs.old == freqs.new)
|
||||
+ return ret;
|
||||
+
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
+
|
||||
+#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
+ pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
|
||||
+#endif
|
||||
+ ret = clk_set_rate(mpu_clk, freqs.new * 1000);
|
||||
+
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int __init omap_cpu_init(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ int result = 0;
|
||||
+
|
||||
+ mpu_clk = clk_get(NULL, "mpu");
|
||||
+ if (IS_ERR(mpu_clk))
|
||||
+ return PTR_ERR(mpu_clk);
|
||||
+
|
||||
+ if (policy->cpu != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ policy->cur = policy->min = policy->max = omap_getspeed(0);
|
||||
+
|
||||
+ clk_init_cpufreq_table(&freq_table);
|
||||
+
|
||||
+ if (freq_table) {
|
||||
+ result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
+ if (!result)
|
||||
+ cpufreq_frequency_table_get_attr(freq_table,
|
||||
+ policy->cpu);
|
||||
+ } else {
|
||||
+ policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
|
||||
+ policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
|
||||
+ VERY_HI_RATE) / 1000;
|
||||
+ }
|
||||
+
|
||||
+ policy->min = policy->cpuinfo.min_freq;
|
||||
+ policy->max = policy->cpuinfo.max_freq;
|
||||
+ policy->cur = omap_getspeed(0);
|
||||
+
|
||||
+ /* FIXME: what's the actual transition time? */
|
||||
+ policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ clk_exit_cpufreq_table(&freq_table);
|
||||
+ clk_put(mpu_clk);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct freq_attr *omap_cpufreq_attr[] = {
|
||||
+ &cpufreq_freq_attr_scaling_available_freqs,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static struct cpufreq_driver omap_driver = {
|
||||
+ .flags = CPUFREQ_STICKY,
|
||||
+ .verify = omap_verify_speed,
|
||||
+ .target = omap_target,
|
||||
+ .get = omap_getspeed,
|
||||
+ .init = omap_cpu_init,
|
||||
+ .exit = omap_cpu_exit,
|
||||
+ .name = "omap1",
|
||||
+ .attr = omap_cpufreq_attr,
|
||||
+};
|
||||
+
|
||||
+static int __init omap_cpufreq_init(void)
|
||||
+{
|
||||
+ return cpufreq_register_driver(&omap_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit omap_cpufreq_exit(void)
|
||||
+{
|
||||
+ cpufreq_unregister_driver(&omap_driver);
|
||||
+}
|
||||
+
|
||||
+MODULE_DESCRIPTION("cpufreq driver for OMAP1 SOCs");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+module_init(omap_cpufreq_init);
|
||||
+module_exit(omap_cpufreq_exit);
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index 8e79ca5..7927dd6 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -56,6 +56,9 @@ obj-$(CONFIG_ARCH_OMAP3) += opp3xxx_data.o
|
||||
obj-$(CONFIG_ARCH_OMAP4) += opp4xxx_data.o
|
||||
endif
|
||||
|
||||
+# CPUFREQ driver
|
||||
+obj-$(CONFIG_CPU_FREQ) += omap2plus-cpufreq.o
|
||||
+
|
||||
# Power Management
|
||||
ifeq ($(CONFIG_PM),y)
|
||||
obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
new file mode 100644
|
||||
index 0000000..27f641b
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -0,0 +1,201 @@
|
||||
+/*
|
||||
+ * OMAP2PLUS cpufreq driver
|
||||
+ *
|
||||
+ * CPU frequency scaling for OMAP
|
||||
+ *
|
||||
+ * Copyright (C) 2005 Nokia Corporation
|
||||
+ * Written by Tony Lindgren <tony@atomide.com>
|
||||
+ *
|
||||
+ * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
|
||||
+ *
|
||||
+ * Copyright (C) 2007-2011 Texas Instruments, Inc.
|
||||
+ * Updated to support OMAP3
|
||||
+ * Rajendra Nayak <rnayak@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ */
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/cpufreq.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/io.h>
|
||||
+#include <linux/opp.h>
|
||||
+
|
||||
+#include <asm/system.h>
|
||||
+#include <asm/smp_plat.h>
|
||||
+
|
||||
+#include <plat/clock.h>
|
||||
+#include <plat/omap-pm.h>
|
||||
+#include <plat/common.h>
|
||||
+
|
||||
+#include <mach/hardware.h>
|
||||
+
|
||||
+#define VERY_HI_RATE 900000000
|
||||
+
|
||||
+static struct cpufreq_frequency_table *freq_table;
|
||||
+static struct clk *mpu_clk;
|
||||
+
|
||||
+static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ if (freq_table)
|
||||
+ return cpufreq_frequency_table_verify(policy, freq_table);
|
||||
+
|
||||
+ if (policy->cpu)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
+ policy->cpuinfo.max_freq);
|
||||
+
|
||||
+ policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
|
||||
+ policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
|
||||
+ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
+ policy->cpuinfo.max_freq);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int omap_getspeed(unsigned int cpu)
|
||||
+{
|
||||
+ unsigned long rate;
|
||||
+
|
||||
+ if (cpu)
|
||||
+ return 0;
|
||||
+
|
||||
+ rate = clk_get_rate(mpu_clk) / 1000;
|
||||
+ return rate;
|
||||
+}
|
||||
+
|
||||
+static int omap_target(struct cpufreq_policy *policy,
|
||||
+ unsigned int target_freq,
|
||||
+ unsigned int relation)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ struct cpufreq_freqs freqs;
|
||||
+
|
||||
+ /* Ensure desired rate is within allowed range. Some govenors
|
||||
+ * (ondemand) will just pass target_freq=0 to get the minimum. */
|
||||
+ if (target_freq < policy->min)
|
||||
+ target_freq = policy->min;
|
||||
+ if (target_freq > policy->max)
|
||||
+ target_freq = policy->max;
|
||||
+
|
||||
+ freqs.old = omap_getspeed(0);
|
||||
+ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
+ freqs.cpu = 0;
|
||||
+
|
||||
+ if (freqs.old == freqs.new)
|
||||
+ return ret;
|
||||
+
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
+
|
||||
+#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
+ pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
|
||||
+#endif
|
||||
+
|
||||
+ ret = clk_set_rate(mpu_clk, freqs.new * 1000);
|
||||
+
|
||||
+ /*
|
||||
+ * Generic CPUFREQ driver jiffy update is under !SMP. So jiffies
|
||||
+ * won't get updated when UP machine cpufreq build with
|
||||
+ * CONFIG_SMP enabled. Below code is added only to manage that
|
||||
+ * scenario
|
||||
+ */
|
||||
+ if (!is_smp())
|
||||
+ loops_per_jiffy =
|
||||
+ cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new);
|
||||
+
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ int result = 0;
|
||||
+ struct device *mpu_dev;
|
||||
+
|
||||
+ if (cpu_is_omap24xx())
|
||||
+ mpu_clk = clk_get(NULL, "virt_prcm_set");
|
||||
+ else if (cpu_is_omap34xx())
|
||||
+ mpu_clk = clk_get(NULL, "dpll1_ck");
|
||||
+ else if (cpu_is_omap34xx())
|
||||
+ mpu_clk = clk_get(NULL, "dpll_mpu_ck");
|
||||
+
|
||||
+ if (IS_ERR(mpu_clk))
|
||||
+ return PTR_ERR(mpu_clk);
|
||||
+
|
||||
+ if (policy->cpu != 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ policy->cur = policy->min = policy->max = omap_getspeed(0);
|
||||
+
|
||||
+ mpu_dev = omap2_get_mpuss_device();
|
||||
+ if (!mpu_dev) {
|
||||
+ pr_warning("%s: unable to get the mpu device\n", __func__);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
+
|
||||
+ if (freq_table) {
|
||||
+ result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
+ if (!result)
|
||||
+ cpufreq_frequency_table_get_attr(freq_table,
|
||||
+ policy->cpu);
|
||||
+ } else {
|
||||
+ policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
|
||||
+ policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
|
||||
+ VERY_HI_RATE) / 1000;
|
||||
+ }
|
||||
+
|
||||
+ policy->min = policy->cpuinfo.min_freq;
|
||||
+ policy->max = policy->cpuinfo.max_freq;
|
||||
+ policy->cur = omap_getspeed(0);
|
||||
+
|
||||
+ /* FIXME: what's the actual transition time? */
|
||||
+ policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
+{
|
||||
+ clk_exit_cpufreq_table(&freq_table);
|
||||
+ clk_put(mpu_clk);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct freq_attr *omap_cpufreq_attr[] = {
|
||||
+ &cpufreq_freq_attr_scaling_available_freqs,
|
||||
+ NULL,
|
||||
+};
|
||||
+
|
||||
+static struct cpufreq_driver omap_driver = {
|
||||
+ .flags = CPUFREQ_STICKY,
|
||||
+ .verify = omap_verify_speed,
|
||||
+ .target = omap_target,
|
||||
+ .get = omap_getspeed,
|
||||
+ .init = omap_cpu_init,
|
||||
+ .exit = omap_cpu_exit,
|
||||
+ .name = "omap2plus",
|
||||
+ .attr = omap_cpufreq_attr,
|
||||
+};
|
||||
+
|
||||
+static int __init omap_cpufreq_init(void)
|
||||
+{
|
||||
+ return cpufreq_register_driver(&omap_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit omap_cpufreq_exit(void)
|
||||
+{
|
||||
+ cpufreq_unregister_driver(&omap_driver);
|
||||
+}
|
||||
+
|
||||
+MODULE_DESCRIPTION("cpufreq driver for OMAP2PLUS SOCs");
|
||||
+MODULE_LICENSE("GPL");
|
||||
+module_init(omap_cpufreq_init);
|
||||
+module_exit(omap_cpufreq_exit);
|
||||
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
|
||||
index f0233e6..4ef7493 100644
|
||||
--- a/arch/arm/plat-omap/Makefile
|
||||
+++ b/arch/arm/plat-omap/Makefile
|
||||
@@ -21,7 +21,6 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
|
||||
obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
|
||||
obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
|
||||
|
||||
-obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
|
||||
obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
|
||||
obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
|
||||
obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
|
||||
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
|
||||
deleted file mode 100644
|
||||
index 9cd2709..0000000
|
||||
--- a/arch/arm/plat-omap/cpu-omap.c
|
||||
+++ /dev/null
|
||||
@@ -1,204 +0,0 @@
|
||||
-/*
|
||||
- * linux/arch/arm/plat-omap/cpu-omap.c
|
||||
- *
|
||||
- * CPU frequency scaling for OMAP
|
||||
- *
|
||||
- * Copyright (C) 2005 Nokia Corporation
|
||||
- * Written by Tony Lindgren <tony@atomide.com>
|
||||
- *
|
||||
- * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
|
||||
- *
|
||||
- * Copyright (C) 2007-2008 Texas Instruments, Inc.
|
||||
- * Updated to support OMAP3
|
||||
- * Rajendra Nayak <rnayak@ti.com>
|
||||
- *
|
||||
- * 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.
|
||||
- */
|
||||
-#include <linux/types.h>
|
||||
-#include <linux/kernel.h>
|
||||
-#include <linux/sched.h>
|
||||
-#include <linux/cpufreq.h>
|
||||
-#include <linux/delay.h>
|
||||
-#include <linux/init.h>
|
||||
-#include <linux/err.h>
|
||||
-#include <linux/clk.h>
|
||||
-#include <linux/io.h>
|
||||
-#include <linux/opp.h>
|
||||
-
|
||||
-#include <mach/hardware.h>
|
||||
-#include <plat/clock.h>
|
||||
-#include <asm/system.h>
|
||||
-
|
||||
-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
-#include <plat/omap-pm.h>
|
||||
-#include <plat/common.h>
|
||||
-#endif
|
||||
-
|
||||
-#define VERY_HI_RATE 900000000
|
||||
-
|
||||
-static struct cpufreq_frequency_table *freq_table;
|
||||
-
|
||||
-#ifdef CONFIG_ARCH_OMAP1
|
||||
-#define MPU_CLK "mpu"
|
||||
-#elif defined(CONFIG_ARCH_OMAP3)
|
||||
-#define MPU_CLK "arm_fck"
|
||||
-#else
|
||||
-#define MPU_CLK "virt_prcm_set"
|
||||
-#endif
|
||||
-
|
||||
-static struct clk *mpu_clk;
|
||||
-
|
||||
-/* TODO: Add support for SDRAM timing changes */
|
||||
-
|
||||
-static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
-{
|
||||
- if (freq_table)
|
||||
- return cpufreq_frequency_table_verify(policy, freq_table);
|
||||
-
|
||||
- if (policy->cpu)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
- policy->cpuinfo.max_freq);
|
||||
-
|
||||
- policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
|
||||
- policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
|
||||
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
- policy->cpuinfo.max_freq);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static unsigned int omap_getspeed(unsigned int cpu)
|
||||
-{
|
||||
- unsigned long rate;
|
||||
-
|
||||
- if (cpu)
|
||||
- return 0;
|
||||
-
|
||||
- rate = clk_get_rate(mpu_clk) / 1000;
|
||||
- return rate;
|
||||
-}
|
||||
-
|
||||
-static int omap_target(struct cpufreq_policy *policy,
|
||||
- unsigned int target_freq,
|
||||
- unsigned int relation)
|
||||
-{
|
||||
-#ifdef CONFIG_ARCH_OMAP1
|
||||
- struct cpufreq_freqs freqs;
|
||||
-#endif
|
||||
-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
- unsigned long freq;
|
||||
- struct device *mpu_dev = omap2_get_mpuss_device();
|
||||
-#endif
|
||||
- int ret = 0;
|
||||
-
|
||||
- /* Ensure desired rate is within allowed range. Some govenors
|
||||
- * (ondemand) will just pass target_freq=0 to get the minimum. */
|
||||
- if (target_freq < policy->min)
|
||||
- target_freq = policy->min;
|
||||
- if (target_freq > policy->max)
|
||||
- target_freq = policy->max;
|
||||
-
|
||||
-#ifdef CONFIG_ARCH_OMAP1
|
||||
- freqs.old = omap_getspeed(0);
|
||||
- freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
- freqs.cpu = 0;
|
||||
-
|
||||
- if (freqs.old == freqs.new)
|
||||
- return ret;
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
-#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
- printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
|
||||
- freqs.old, freqs.new);
|
||||
-#endif
|
||||
- ret = clk_set_rate(mpu_clk, freqs.new * 1000);
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
-#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
|
||||
- freq = target_freq * 1000;
|
||||
- if (opp_find_freq_ceil(mpu_dev, &freq))
|
||||
- omap_pm_cpu_set_freq(freq);
|
||||
-#endif
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
-static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
-{
|
||||
- int result = 0;
|
||||
-
|
||||
- mpu_clk = clk_get(NULL, MPU_CLK);
|
||||
- if (IS_ERR(mpu_clk))
|
||||
- return PTR_ERR(mpu_clk);
|
||||
-
|
||||
- if (policy->cpu != 0)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- policy->cur = policy->min = policy->max = omap_getspeed(0);
|
||||
-
|
||||
- if (!cpu_is_omap34xx()) {
|
||||
- clk_init_cpufreq_table(&freq_table);
|
||||
- } else {
|
||||
- struct device *mpu_dev = omap2_get_mpuss_device();
|
||||
-
|
||||
- opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
- }
|
||||
-
|
||||
- if (freq_table) {
|
||||
- result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
- if (!result)
|
||||
- cpufreq_frequency_table_get_attr(freq_table,
|
||||
- policy->cpu);
|
||||
- } else {
|
||||
- policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
|
||||
- policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
|
||||
- VERY_HI_RATE) / 1000;
|
||||
- }
|
||||
-
|
||||
- policy->min = policy->cpuinfo.min_freq;
|
||||
- policy->max = policy->cpuinfo.max_freq;
|
||||
- policy->cur = omap_getspeed(0);
|
||||
-
|
||||
- /* FIXME: what's the actual transition time? */
|
||||
- policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
-{
|
||||
- clk_exit_cpufreq_table(&freq_table);
|
||||
- clk_put(mpu_clk);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static struct freq_attr *omap_cpufreq_attr[] = {
|
||||
- &cpufreq_freq_attr_scaling_available_freqs,
|
||||
- NULL,
|
||||
-};
|
||||
-
|
||||
-static struct cpufreq_driver omap_driver = {
|
||||
- .flags = CPUFREQ_STICKY,
|
||||
- .verify = omap_verify_speed,
|
||||
- .target = omap_target,
|
||||
- .get = omap_getspeed,
|
||||
- .init = omap_cpu_init,
|
||||
- .exit = omap_cpu_exit,
|
||||
- .name = "omap",
|
||||
- .attr = omap_cpufreq_attr,
|
||||
-};
|
||||
-
|
||||
-static int __init omap_cpufreq_init(void)
|
||||
-{
|
||||
- return cpufreq_register_driver(&omap_driver);
|
||||
-}
|
||||
-
|
||||
-late_initcall(omap_cpufreq_init);
|
||||
-
|
||||
-/*
|
||||
- * if ever we want to remove this, upon cleanup call:
|
||||
- *
|
||||
- * cpufreq_unregister_driver()
|
||||
- * cpufreq_frequency_table_put_attr()
|
||||
- */
|
||||
-
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-171
@@ -1,171 +0,0 @@
|
||||
From fed2c5a3d929204d4fc18c6f4a3edbf920e7ee36 Mon Sep 17 00:00:00 2001
|
||||
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Date: Mon, 14 Mar 2011 17:08:49 +0530
|
||||
Subject: [PATCH 08/19] OMAP2PLUS: cpufreq: Add SMP support to cater OMAP4430
|
||||
|
||||
On OMAP SMP configuartion, both processors share the voltage
|
||||
and clock. So both CPUs needs to be scaled together and hence
|
||||
needs software co-ordination.
|
||||
|
||||
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Cc: Kevin Hilman <khilman@ti.com>
|
||||
cc: Vishwanath BS <vishwanath.bs@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 73 ++++++++++++++++++++++++++-----
|
||||
1 files changed, 62 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 27f641b..3730f96 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -26,9 +26,11 @@
|
||||
#include <linux/clk.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/opp.h>
|
||||
+#include <linux/cpu.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/smp_plat.h>
|
||||
+#include <asm/cpu.h>
|
||||
|
||||
#include <plat/clock.h>
|
||||
#include <plat/omap-pm.h>
|
||||
@@ -63,7 +65,7 @@ static unsigned int omap_getspeed(unsigned int cpu)
|
||||
{
|
||||
unsigned long rate;
|
||||
|
||||
- if (cpu)
|
||||
+ if (cpu >= NR_CPUS)
|
||||
return 0;
|
||||
|
||||
rate = clk_get_rate(mpu_clk) / 1000;
|
||||
@@ -74,9 +76,13 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
unsigned int target_freq,
|
||||
unsigned int relation)
|
||||
{
|
||||
- int ret = 0;
|
||||
+ int i, ret = 0;
|
||||
struct cpufreq_freqs freqs;
|
||||
|
||||
+ /* Changes not allowed until all CPUs are online */
|
||||
+ if (is_smp() && (num_online_cpus() < NR_CPUS))
|
||||
+ return ret;
|
||||
+
|
||||
/* Ensure desired rate is within allowed range. Some govenors
|
||||
* (ondemand) will just pass target_freq=0 to get the minimum. */
|
||||
if (target_freq < policy->min)
|
||||
@@ -84,15 +90,25 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
if (target_freq > policy->max)
|
||||
target_freq = policy->max;
|
||||
|
||||
- freqs.old = omap_getspeed(0);
|
||||
+ freqs.old = omap_getspeed(policy->cpu);
|
||||
freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
- freqs.cpu = 0;
|
||||
+ freqs.cpu = policy->cpu;
|
||||
|
||||
if (freqs.old == freqs.new)
|
||||
return ret;
|
||||
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
+ if (!is_smp()) {
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
+ goto set_freq;
|
||||
+ }
|
||||
+
|
||||
+ /* notifiers */
|
||||
+ for_each_cpu(i, policy->cpus) {
|
||||
+ freqs.cpu = i;
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
+ }
|
||||
|
||||
+set_freq:
|
||||
#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
|
||||
#endif
|
||||
@@ -105,12 +121,33 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
* CONFIG_SMP enabled. Below code is added only to manage that
|
||||
* scenario
|
||||
*/
|
||||
- if (!is_smp())
|
||||
+ freqs.new = omap_getspeed(policy->cpu);
|
||||
+ if (!is_smp()) {
|
||||
loops_per_jiffy =
|
||||
cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new);
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
+ goto skip_lpj;
|
||||
+ }
|
||||
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
+#ifdef CONFIG_SMP
|
||||
+ /*
|
||||
+ * Note that loops_per_jiffy is not updated on SMP systems in
|
||||
+ * cpufreq driver. So, update the per-CPU loops_per_jiffy value
|
||||
+ * on frequency transition. We need to update all dependent CPUs.
|
||||
+ */
|
||||
+ for_each_cpu(i, policy->cpus)
|
||||
+ per_cpu(cpu_data, i).loops_per_jiffy =
|
||||
+ cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
|
||||
+ freqs.old, freqs.new);
|
||||
+#endif
|
||||
|
||||
+ /* notifiers */
|
||||
+ for_each_cpu(i, policy->cpus) {
|
||||
+ freqs.cpu = i;
|
||||
+ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
+ }
|
||||
+
|
||||
+skip_lpj:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -118,6 +155,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int result = 0;
|
||||
struct device *mpu_dev;
|
||||
+ static cpumask_var_t cpumask;
|
||||
|
||||
if (cpu_is_omap24xx())
|
||||
mpu_clk = clk_get(NULL, "virt_prcm_set");
|
||||
@@ -129,12 +167,12 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
if (IS_ERR(mpu_clk))
|
||||
return PTR_ERR(mpu_clk);
|
||||
|
||||
- if (policy->cpu != 0)
|
||||
+ if (policy->cpu >= NR_CPUS)
|
||||
return -EINVAL;
|
||||
|
||||
- policy->cur = policy->min = policy->max = omap_getspeed(0);
|
||||
-
|
||||
+ policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
|
||||
mpu_dev = omap2_get_mpuss_device();
|
||||
+
|
||||
if (!mpu_dev) {
|
||||
pr_warning("%s: unable to get the mpu device\n", __func__);
|
||||
return -EINVAL;
|
||||
@@ -154,7 +192,20 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
|
||||
policy->min = policy->cpuinfo.min_freq;
|
||||
policy->max = policy->cpuinfo.max_freq;
|
||||
- policy->cur = omap_getspeed(0);
|
||||
+ policy->cur = omap_getspeed(policy->cpu);
|
||||
+
|
||||
+ /*
|
||||
+ * On OMAP SMP configuartion, both processors share the voltage
|
||||
+ * and clock. So both CPUs needs to be scaled together and hence
|
||||
+ * needs software co-ordination. Use cpufreq affected_cpus
|
||||
+ * interface to handle this scenario. Additional is_smp() check
|
||||
+ * is to keep SMP_ON_UP build working.
|
||||
+ */
|
||||
+ if (is_smp()) {
|
||||
+ policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
|
||||
+ cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
|
||||
+ cpumask_copy(policy->cpus, cpumask);
|
||||
+ }
|
||||
|
||||
/* FIXME: what's the actual transition time? */
|
||||
policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
From d046bd12930aa5daf951d9af8614c60677c8ff15 Mon Sep 17 00:00:00 2001
|
||||
From: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Date: Thu, 14 Apr 2011 16:21:58 +0300
|
||||
Subject: [PATCH 09/19] OMAP2PLUS: cpufreq: Fix typo when attempting to set mpu_clk for OMAP4
|
||||
|
||||
Fix this typo as there is no dpll_mpu_ck for OMAP3 and code flow is clearly
|
||||
trying to set mpu_clk for OMAP4 for which this dpll_mpu_ck is available.
|
||||
|
||||
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 3730f96..a725d90 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -161,7 +161,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
mpu_clk = clk_get(NULL, "virt_prcm_set");
|
||||
else if (cpu_is_omap34xx())
|
||||
mpu_clk = clk_get(NULL, "dpll1_ck");
|
||||
- else if (cpu_is_omap34xx())
|
||||
+ else if (cpu_is_omap44xx())
|
||||
mpu_clk = clk_get(NULL, "dpll_mpu_ck");
|
||||
|
||||
if (IS_ERR(mpu_clk))
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
From 0ec2aee24f701ecd6135dce0b3f1a71249583689 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 25 May 2011 16:38:46 -0700
|
||||
Subject: [PATCH 10/19] OMAP2+: cpufreq: move clk name decision to init
|
||||
|
||||
Clk name does'nt need to dynamically detected during clk init.
|
||||
move them off to driver initialization, if we dont have a clk name,
|
||||
there is no point in registering the driver anyways. The actual clk
|
||||
get and put is left at cpu_init and exit functions.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 20 +++++++++++++-------
|
||||
1 files changed, 13 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index a725d90..c46d0cd 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
static struct clk *mpu_clk;
|
||||
+static char *mpu_clk_name;
|
||||
|
||||
static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
{
|
||||
@@ -157,13 +158,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
struct device *mpu_dev;
|
||||
static cpumask_var_t cpumask;
|
||||
|
||||
- if (cpu_is_omap24xx())
|
||||
- mpu_clk = clk_get(NULL, "virt_prcm_set");
|
||||
- else if (cpu_is_omap34xx())
|
||||
- mpu_clk = clk_get(NULL, "dpll1_ck");
|
||||
- else if (cpu_is_omap44xx())
|
||||
- mpu_clk = clk_get(NULL, "dpll_mpu_ck");
|
||||
-
|
||||
+ mpu_clk = clk_get(NULL, mpu_clk_name);
|
||||
if (IS_ERR(mpu_clk))
|
||||
return PTR_ERR(mpu_clk);
|
||||
|
||||
@@ -238,6 +233,17 @@ static struct cpufreq_driver omap_driver = {
|
||||
|
||||
static int __init omap_cpufreq_init(void)
|
||||
{
|
||||
+ if (cpu_is_omap24xx())
|
||||
+ mpu_clk_name = "virt_prcm_set";
|
||||
+ else if (cpu_is_omap34xx())
|
||||
+ mpu_clk_name = "dpll1_ck";
|
||||
+ else if (cpu_is_omap44xx())
|
||||
+ mpu_clk_name = "dpll_mpu_ck";
|
||||
+
|
||||
+ if (!mpu_clk_name) {
|
||||
+ pr_err("%s: unsupported Silicon?\n", __func__);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
return cpufreq_register_driver(&omap_driver);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-64
@@ -1,64 +0,0 @@
|
||||
From 7c76e002041cd5b084c9a8b6729ab33acf53643e Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Wed, 25 May 2011 16:38:47 -0700
|
||||
Subject: [PATCH 11/19] OMAP2+: cpufreq: deny initialization if no mpudev
|
||||
|
||||
if we do not have mpu_dev we normally fail in cpu_init. It is better
|
||||
to fail driver registration if the devices are not available.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 15 ++++++++-------
|
||||
1 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index c46d0cd..33a91ec 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -43,6 +43,7 @@
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
static struct clk *mpu_clk;
|
||||
static char *mpu_clk_name;
|
||||
+static struct device *mpu_dev;
|
||||
|
||||
static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
{
|
||||
@@ -155,7 +156,6 @@ skip_lpj:
|
||||
static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int result = 0;
|
||||
- struct device *mpu_dev;
|
||||
static cpumask_var_t cpumask;
|
||||
|
||||
mpu_clk = clk_get(NULL, mpu_clk_name);
|
||||
@@ -166,12 +166,6 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
return -EINVAL;
|
||||
|
||||
policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
|
||||
- mpu_dev = omap2_get_mpuss_device();
|
||||
-
|
||||
- if (!mpu_dev) {
|
||||
- pr_warning("%s: unable to get the mpu device\n", __func__);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
|
||||
if (freq_table) {
|
||||
@@ -244,6 +238,13 @@ static int __init omap_cpufreq_init(void)
|
||||
pr_err("%s: unsupported Silicon?\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
+ mpu_dev = omap2_get_mpuss_device();
|
||||
+ if (!mpu_dev) {
|
||||
+ pr_warning("%s: unable to get the mpu device\n", __func__);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
return cpufreq_register_driver(&omap_driver);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-129
@@ -1,129 +0,0 @@
|
||||
From 407f4d9ed824d458406f139a7698c74a1eb3b8f7 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Thu, 26 May 2011 19:39:17 -0700
|
||||
Subject: [PATCH 12/19] OMAP2+: cpufreq: dont support !freq_table
|
||||
|
||||
OMAP2+ all have frequency tables, hence the hacks we had for older
|
||||
silicon do not need to be carried forward. As part of this change,
|
||||
use cpufreq_frequency_table_target to find the best match for
|
||||
frequency requested.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 67 +++++++++++++++----------------
|
||||
1 files changed, 33 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 33a91ec..acf18e8 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -38,8 +38,6 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
-#define VERY_HI_RATE 900000000
|
||||
-
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
static struct clk *mpu_clk;
|
||||
static char *mpu_clk_name;
|
||||
@@ -47,20 +45,9 @@ static struct device *mpu_dev;
|
||||
|
||||
static int omap_verify_speed(struct cpufreq_policy *policy)
|
||||
{
|
||||
- if (freq_table)
|
||||
- return cpufreq_frequency_table_verify(policy, freq_table);
|
||||
-
|
||||
- if (policy->cpu)
|
||||
+ if (!freq_table)
|
||||
return -EINVAL;
|
||||
-
|
||||
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
- policy->cpuinfo.max_freq);
|
||||
-
|
||||
- policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
|
||||
- policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
|
||||
- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
|
||||
- policy->cpuinfo.max_freq);
|
||||
- return 0;
|
||||
+ return cpufreq_frequency_table_verify(policy, freq_table);
|
||||
}
|
||||
|
||||
static unsigned int omap_getspeed(unsigned int cpu)
|
||||
@@ -78,22 +65,35 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
unsigned int target_freq,
|
||||
unsigned int relation)
|
||||
{
|
||||
- int i, ret = 0;
|
||||
+ unsigned int i;
|
||||
+ int ret = 0;
|
||||
struct cpufreq_freqs freqs;
|
||||
|
||||
/* Changes not allowed until all CPUs are online */
|
||||
if (is_smp() && (num_online_cpus() < NR_CPUS))
|
||||
return ret;
|
||||
|
||||
- /* Ensure desired rate is within allowed range. Some govenors
|
||||
- * (ondemand) will just pass target_freq=0 to get the minimum. */
|
||||
- if (target_freq < policy->min)
|
||||
- target_freq = policy->min;
|
||||
- if (target_freq > policy->max)
|
||||
- target_freq = policy->max;
|
||||
+ if (!freq_table) {
|
||||
+ dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__,
|
||||
+ policy->cpu);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ ret = cpufreq_frequency_table_target(policy, freq_table, target_freq,
|
||||
+ relation, &i);
|
||||
+ if (ret) {
|
||||
+ dev_dbg(mpu_dev, "%s: cpu%d: no freq match for %d(ret=%d)\n",
|
||||
+ __func__, policy->cpu, target_freq, ret);
|
||||
+ return ret;
|
||||
+ }
|
||||
+ freqs.new = freq_table[i].frequency;
|
||||
+ if (!freqs.new) {
|
||||
+ dev_err(mpu_dev, "%s: cpu%d: no match for freq %d\n", __func__,
|
||||
+ policy->cpu, target_freq);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
|
||||
freqs.old = omap_getspeed(policy->cpu);
|
||||
- freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
|
||||
freqs.cpu = policy->cpu;
|
||||
|
||||
if (freqs.old == freqs.new)
|
||||
@@ -166,19 +166,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
return -EINVAL;
|
||||
|
||||
policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
|
||||
- opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
-
|
||||
- if (freq_table) {
|
||||
- result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
- if (!result)
|
||||
- cpufreq_frequency_table_get_attr(freq_table,
|
||||
- policy->cpu);
|
||||
- } else {
|
||||
- policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
|
||||
- policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
|
||||
- VERY_HI_RATE) / 1000;
|
||||
+ result = opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
+
|
||||
+ if (result) {
|
||||
+ dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n",
|
||||
+ __func__, policy->cpu, result);
|
||||
+ return result;
|
||||
}
|
||||
|
||||
+ result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
+ if (!result)
|
||||
+ cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
|
||||
+
|
||||
policy->min = policy->cpuinfo.min_freq;
|
||||
policy->max = policy->cpuinfo.max_freq;
|
||||
policy->cur = omap_getspeed(policy->cpu);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
From 525df87add27c07a76e06c45f0756b204a5a3880 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Thu, 26 May 2011 19:39:18 -0700
|
||||
Subject: [PATCH 13/19] OMAP2+: cpufreq: only supports OPP library
|
||||
|
||||
OMAP2 is the only family using clk_[init|exit]_cpufreq_table, however,
|
||||
the cpufreq code does not currently use clk_init_cpufreq_table. As a
|
||||
result, it is unusuable for OMAP2 and only usable only on platforms
|
||||
using OPP library.
|
||||
|
||||
Remove the unbalanced clk_exit_cpufreq_table(). Any platforms where
|
||||
OPPs are not availble will fail on init because a freq table will not
|
||||
be properly initialized.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
[khilman@ti.com: changelog edits, and graceful failure mode changes]
|
||||
Acked-by: Kevin Hilman <khilman@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 3 +--
|
||||
1 files changed, 1 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index acf18e8..3af7cda 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* OMAP2PLUS cpufreq driver
|
||||
*
|
||||
- * CPU frequency scaling for OMAP
|
||||
+ * CPU frequency scaling for OMAP using OPP information
|
||||
*
|
||||
* Copyright (C) 2005 Nokia Corporation
|
||||
* Written by Tony Lindgren <tony@atomide.com>
|
||||
@@ -203,7 +203,6 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
|
||||
static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
{
|
||||
- clk_exit_cpufreq_table(&freq_table);
|
||||
clk_put(mpu_clk);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
From b0f40f6545e9ae32b6cbd2cb03561de805297bf5 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Thu, 26 May 2011 19:39:19 -0700
|
||||
Subject: [PATCH 14/19] OMAP2+: cpufreq: put clk if cpu_init failed
|
||||
|
||||
Release the mpu_clk in fail paths.
|
||||
|
||||
Reported-by: Todd Poynor <toddpoynor@google.com>
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 14 +++++++++++---
|
||||
1 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 3af7cda..e019297 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -162,8 +162,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
if (IS_ERR(mpu_clk))
|
||||
return PTR_ERR(mpu_clk);
|
||||
|
||||
- if (policy->cpu >= NR_CPUS)
|
||||
- return -EINVAL;
|
||||
+ if (policy->cpu >= NR_CPUS) {
|
||||
+ result = -EINVAL;
|
||||
+ goto fail_ck;
|
||||
+ }
|
||||
|
||||
policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
|
||||
result = opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
@@ -171,12 +173,14 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
if (result) {
|
||||
dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n",
|
||||
__func__, policy->cpu, result);
|
||||
- return result;
|
||||
+ goto fail_ck;
|
||||
}
|
||||
|
||||
result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
if (!result)
|
||||
cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
|
||||
+ else
|
||||
+ goto fail_ck;
|
||||
|
||||
policy->min = policy->cpuinfo.min_freq;
|
||||
policy->max = policy->cpuinfo.max_freq;
|
||||
@@ -199,6 +203,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
policy->cpuinfo.transition_latency = 300 * 1000;
|
||||
|
||||
return 0;
|
||||
+
|
||||
+fail_ck:
|
||||
+ clk_put(mpu_clk);
|
||||
+ return result;
|
||||
}
|
||||
|
||||
static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-90
@@ -1,90 +0,0 @@
|
||||
From 67324a92ca4778fb6be86058c91ac7c9442ede16 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Thu, 26 May 2011 19:39:20 -0700
|
||||
Subject: [PATCH 15/19] OMAP2+: cpufreq: fix freq_table leak
|
||||
|
||||
We use a single frequency table for multiple CPUs. But, with
|
||||
OMAP4, since we have multiple CPUs, the cpu_init call for CPU1
|
||||
causes freq_table previously allocated for CPU0 to be overwritten.
|
||||
In addition, we dont free the table on exit path.
|
||||
|
||||
We solve this by maintaining an atomic type counter to ensure
|
||||
just a single table exists at a given time.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 22 +++++++++++++++++-----
|
||||
1 files changed, 17 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index e019297..a962a31 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <mach/hardware.h>
|
||||
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
+static atomic_t freq_table_users = ATOMIC_INIT(0);
|
||||
static struct clk *mpu_clk;
|
||||
static char *mpu_clk_name;
|
||||
static struct device *mpu_dev;
|
||||
@@ -153,6 +154,12 @@ skip_lpj:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static inline void freq_table_free(void)
|
||||
+{
|
||||
+ if (atomic_dec_and_test(&freq_table_users))
|
||||
+ opp_free_cpufreq_table(mpu_dev, &freq_table);
|
||||
+}
|
||||
+
|
||||
static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int result = 0;
|
||||
@@ -168,7 +175,9 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
}
|
||||
|
||||
policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
|
||||
- result = opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
+
|
||||
+ if (atomic_inc_return(&freq_table_users) == 1)
|
||||
+ result = opp_init_cpufreq_table(mpu_dev, &freq_table);
|
||||
|
||||
if (result) {
|
||||
dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n",
|
||||
@@ -177,10 +186,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
}
|
||||
|
||||
result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
|
||||
- if (!result)
|
||||
- cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
|
||||
- else
|
||||
- goto fail_ck;
|
||||
+ if (result)
|
||||
+ goto fail_table;
|
||||
+
|
||||
+ cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
|
||||
|
||||
policy->min = policy->cpuinfo.min_freq;
|
||||
policy->max = policy->cpuinfo.max_freq;
|
||||
@@ -204,6 +213,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
|
||||
return 0;
|
||||
|
||||
+fail_table:
|
||||
+ freq_table_free();
|
||||
fail_ck:
|
||||
clk_put(mpu_clk);
|
||||
return result;
|
||||
@@ -211,6 +222,7 @@ fail_ck:
|
||||
|
||||
static int omap_cpu_exit(struct cpufreq_policy *policy)
|
||||
{
|
||||
+ freq_table_free();
|
||||
clk_put(mpu_clk);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
From f0e647da78b80946ab301787aba4330bd7d1429d Mon Sep 17 00:00:00 2001
|
||||
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Date: Fri, 3 Jun 2011 17:46:57 +0530
|
||||
Subject: [PATCH 16/19] OMAP2+: CPUfreq: Remove superfluous check in target() for online CPU's.
|
||||
|
||||
Current OMAP2PLUS CPUfreq tagret() functions returns when all
|
||||
the CPU's are not online. This breaks CPUfreq when secondary CPUs
|
||||
are offlined on SMP system.
|
||||
|
||||
The intention of that check was just avoid CPU frequency change
|
||||
during the window when CPU becomes online but it's cpufreq_init is
|
||||
not done yet. Otherwise it can lead to notifiers being sent on
|
||||
a CPU which is not yet registered to the governor.
|
||||
|
||||
But this race conditions is already managed by the CPUfreq
|
||||
core driver by updating the available cpumask accordingly.
|
||||
|
||||
OMAP CPUFReq driver make use same cpumask for the notifiers
|
||||
so the above problem doesn't exist. In my initial implementation
|
||||
of the OMAP4 CPUFreq driver, I was using 'for_each_online_cpu()'
|
||||
for notifiers which lead me to add that check. Later I fixed
|
||||
the notifies but didn't realise that the check has become
|
||||
redundant then.
|
||||
|
||||
Fix it by removing the superfluous check in target().
|
||||
|
||||
Thanks for Nishant Menon <nm@ti.com> for reporting issue
|
||||
with hot-plug and Kevin Hilman <khilman@ti.com> for his
|
||||
comment on excessive check in target().
|
||||
|
||||
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Reported-by: Nishanth Menon <nm@ti.com>
|
||||
Tested-by: Vishwanath BS <vishwanath.bs@ti.com>
|
||||
Cc: Kevin Hilman <khilman@ti.com>
|
||||
Tested-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 4 ----
|
||||
1 files changed, 0 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index a962a31..eaefa49 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -70,10 +70,6 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
int ret = 0;
|
||||
struct cpufreq_freqs freqs;
|
||||
|
||||
- /* Changes not allowed until all CPUs are online */
|
||||
- if (is_smp() && (num_online_cpus() < NR_CPUS))
|
||||
- return ret;
|
||||
-
|
||||
if (!freq_table) {
|
||||
dev_err(mpu_dev, "%s: cpu%d: no freq table!\n", __func__,
|
||||
policy->cpu);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From 669ad0bf5d48d8675365a212f561f57bec4d9158 Mon Sep 17 00:00:00 2001
|
||||
From: Colin Cross <ccross@google.com>
|
||||
Date: Mon, 6 Jun 2011 21:05:29 -0500
|
||||
Subject: [PATCH 17/19] OMAP2+: cpufreq: notify even with bad boot frequency
|
||||
|
||||
Sometimes, bootloaders starts up with a frequency which is not
|
||||
in the OPP table. At cpu_init, policy->cur contains the frequency
|
||||
we pick at boot. It is possible that system might have fixed
|
||||
it's boot frequency later on as part of power initialization.
|
||||
After this condition, the first call to omap_target results in the
|
||||
following:
|
||||
|
||||
omap_getspeed(actual device frequency) != policy->cur(frequency that
|
||||
cpufreq thinks that the system is at), and it is possible that
|
||||
freqs.old == freqs.new (because the governor requested a scale down).
|
||||
|
||||
We exit without triggering the notifiers in the current code, which
|
||||
does'nt let code which depends on cpufreq_notify_transition to have
|
||||
accurate information as to what the system frequency is.
|
||||
|
||||
Instead, we do a normal transition if policy->cur is wrong, then,
|
||||
freqs.old will be the actual cpu frequency, freqs.new will be the
|
||||
actual new cpu frequency and all required notifiers have the accurate
|
||||
information.
|
||||
|
||||
Acked-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Colin Cross <ccross@google.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index eaefa49..8598928 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -93,7 +93,7 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
freqs.old = omap_getspeed(policy->cpu);
|
||||
freqs.cpu = policy->cpu;
|
||||
|
||||
- if (freqs.old == freqs.new)
|
||||
+ if (freqs.old == freqs.new && policy->cur == freqs.new)
|
||||
return ret;
|
||||
|
||||
if (!is_smp()) {
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 0d8c6a265f29587ab9c6df1c6bebe359a8d71d09 Mon Sep 17 00:00:00 2001
|
||||
From: Todd Poynor <toddpoynor@google.com>
|
||||
Date: Tue, 7 Jun 2011 13:57:52 -0700
|
||||
Subject: [PATCH 18/19] OMAP2+: cpufreq: Enable all CPUs in shared policy mask
|
||||
|
||||
Enable all CPUs in the shared policy in the CPU init callback.
|
||||
Otherwise, the governor CPUFREQ_GOV_START event is invoked with
|
||||
a policy that only includes the first CPU, leaving other CPUs
|
||||
uninitialized by the governor.
|
||||
|
||||
Signed-off-by: Todd Poynor <toddpoynor@google.com>
|
||||
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 4 +---
|
||||
1 files changed, 1 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 8598928..1f3b2e1 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -159,7 +159,6 @@ static inline void freq_table_free(void)
|
||||
static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int result = 0;
|
||||
- static cpumask_var_t cpumask;
|
||||
|
||||
mpu_clk = clk_get(NULL, mpu_clk_name);
|
||||
if (IS_ERR(mpu_clk))
|
||||
@@ -200,8 +199,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
|
||||
*/
|
||||
if (is_smp()) {
|
||||
policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
|
||||
- cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
|
||||
- cpumask_copy(policy->cpus, cpumask);
|
||||
+ cpumask_setall(policy->cpus);
|
||||
}
|
||||
|
||||
/* FIXME: what's the actual transition time? */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-121
@@ -1,121 +0,0 @@
|
||||
From 550f74e2915393426e15c8d12695707253c8a91d Mon Sep 17 00:00:00 2001
|
||||
From: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Date: Mon, 11 Jul 2011 23:10:04 +0530
|
||||
Subject: [PATCH 19/19] OMAP2+: CPUfreq: update lpj with reference value to avoid progressive error.
|
||||
|
||||
Adjust _both_ the per-cpu loops_per_jiffy and global lpj. Calibrate them
|
||||
with with reference to the initial values to avoid a progressively
|
||||
bigger and bigger error in the value over time.
|
||||
|
||||
While at this, re-use the notifiers for UP/SMP since on
|
||||
UP machine or UP_ON_SMP policy->cpus mask would contain only
|
||||
the boot CPU.
|
||||
|
||||
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
[santosh.shilimkar@ti.com: re-based against omap cpufreq
|
||||
upstream branch and fixed notifiers]
|
||||
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
|
||||
Cc: Kevin Hilman <khilman@ti.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/omap2plus-cpufreq.c | 50 ++++++++++++++++--------------
|
||||
1 files changed, 27 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
index 1f3b2e1..de82e87 100644
|
||||
--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
+++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
|
||||
@@ -38,6 +38,16 @@
|
||||
|
||||
#include <mach/hardware.h>
|
||||
|
||||
+#ifdef CONFIG_SMP
|
||||
+struct lpj_info {
|
||||
+ unsigned long ref;
|
||||
+ unsigned int freq;
|
||||
+};
|
||||
+
|
||||
+static DEFINE_PER_CPU(struct lpj_info, lpj_ref);
|
||||
+static struct lpj_info global_lpj_ref;
|
||||
+#endif
|
||||
+
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
static atomic_t freq_table_users = ATOMIC_INIT(0);
|
||||
static struct clk *mpu_clk;
|
||||
@@ -96,37 +106,18 @@ static int omap_target(struct cpufreq_policy *policy,
|
||||
if (freqs.old == freqs.new && policy->cur == freqs.new)
|
||||
return ret;
|
||||
|
||||
- if (!is_smp()) {
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
- goto set_freq;
|
||||
- }
|
||||
-
|
||||
/* notifiers */
|
||||
for_each_cpu(i, policy->cpus) {
|
||||
freqs.cpu = i;
|
||||
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||
}
|
||||
|
||||
-set_freq:
|
||||
#ifdef CONFIG_CPU_FREQ_DEBUG
|
||||
pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
|
||||
#endif
|
||||
|
||||
ret = clk_set_rate(mpu_clk, freqs.new * 1000);
|
||||
-
|
||||
- /*
|
||||
- * Generic CPUFREQ driver jiffy update is under !SMP. So jiffies
|
||||
- * won't get updated when UP machine cpufreq build with
|
||||
- * CONFIG_SMP enabled. Below code is added only to manage that
|
||||
- * scenario
|
||||
- */
|
||||
freqs.new = omap_getspeed(policy->cpu);
|
||||
- if (!is_smp()) {
|
||||
- loops_per_jiffy =
|
||||
- cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new);
|
||||
- cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
- goto skip_lpj;
|
||||
- }
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/*
|
||||
@@ -134,10 +125,24 @@ set_freq:
|
||||
* cpufreq driver. So, update the per-CPU loops_per_jiffy value
|
||||
* on frequency transition. We need to update all dependent CPUs.
|
||||
*/
|
||||
- for_each_cpu(i, policy->cpus)
|
||||
+ for_each_cpu(i, policy->cpus) {
|
||||
+ struct lpj_info *lpj = &per_cpu(lpj_ref, i);
|
||||
+ if (!lpj->freq) {
|
||||
+ lpj->ref = per_cpu(cpu_data, i).loops_per_jiffy;
|
||||
+ lpj->freq = freqs.old;
|
||||
+ }
|
||||
+
|
||||
per_cpu(cpu_data, i).loops_per_jiffy =
|
||||
- cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
|
||||
- freqs.old, freqs.new);
|
||||
+ cpufreq_scale(lpj->ref, lpj->freq, freqs.new);
|
||||
+ }
|
||||
+
|
||||
+ /* And don't forget to adjust the global one */
|
||||
+ if (!global_lpj_ref.freq) {
|
||||
+ global_lpj_ref.ref = loops_per_jiffy;
|
||||
+ global_lpj_ref.freq = freqs.old;
|
||||
+ }
|
||||
+ loops_per_jiffy = cpufreq_scale(global_lpj_ref.ref, global_lpj_ref.freq,
|
||||
+ freqs.new);
|
||||
#endif
|
||||
|
||||
/* notifiers */
|
||||
@@ -146,7 +151,6 @@ set_freq:
|
||||
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||
}
|
||||
|
||||
-skip_lpj:
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-1083
File diff suppressed because it is too large
Load Diff
-160
@@ -1,160 +0,0 @@
|
||||
From a3d13ae14bca7c412e5b0575c244ce7370fa3747 Mon Sep 17 00:00:00 2001
|
||||
From: Oleg Drokin <green@linuxhacker.ru>
|
||||
Date: Mon, 6 Jun 2011 18:57:08 +0000
|
||||
Subject: [PATCH 002/149] Remove old-style supply.dev assignments common in hsmmc init
|
||||
|
||||
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
||||
CC: Mike Rapoport <mike@compulab.co.il>
|
||||
CC: Nishant Kamat <nskamat@ti.com>
|
||||
CC: Steve Sakoman <steve@sakoman.com>
|
||||
CC: Felipe Balbi <balbi@ti.com>
|
||||
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
|
||||
Acked-by: Felipe Balbi <balbi@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 4 ----
|
||||
arch/arm/mach-omap2/board-ldp.c | 2 --
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3logic.c | 2 --
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 4 ----
|
||||
arch/arm/mach-omap2/board-overo.c | 2 --
|
||||
arch/arm/mach-omap2/board-zoom-peripherals.c | 7 -------
|
||||
9 files changed, 0 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index e7bf32d..ceb581e 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -483,10 +483,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters */
|
||||
- cm_t35_vmmc1_supply.dev = mmc[0].dev;
|
||||
- cm_t35_vsim_supply.dev = mmc[0].dev;
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
|
||||
index 069bc9f..2d7e0ae 100644
|
||||
--- a/arch/arm/mach-omap2/board-ldp.c
|
||||
+++ b/arch/arm/mach-omap2/board-ldp.c
|
||||
@@ -341,8 +341,6 @@ static void __init omap_ldp_init(void)
|
||||
ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
|
||||
|
||||
omap2_hsmmc_init(mmc);
|
||||
- /* link regulators to MMC adapters */
|
||||
- ldp_vmmc1_supply.dev = mmc[0].dev;
|
||||
}
|
||||
|
||||
MACHINE_START(OMAP_LDP, "OMAP LDP board")
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 4cf7c19..8ef0e19 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -268,10 +268,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters */
|
||||
- beagle_vmmc1_supply.dev = mmc[0].dev;
|
||||
- beagle_vsim_supply.dev = mmc[0].dev;
|
||||
-
|
||||
/*
|
||||
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
|
||||
* high / others active low)
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index fc7a23a..e2202dd 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters */
|
||||
- omap3evm_vmmc1_supply.dev = mmc[0].dev;
|
||||
- omap3evm_vsim_supply.dev = mmc[0].dev;
|
||||
-
|
||||
/*
|
||||
* Most GPIOs are for USB OTG. Some are mostly sent to
|
||||
* the P2 connector; notably LEDA for the LCD backlight.
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
index ec18435..eaefb59 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3logic.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
@@ -130,8 +130,6 @@ static void __init board_mmc_init(void)
|
||||
}
|
||||
|
||||
omap2_hsmmc_init(board_mmc_info);
|
||||
- /* link regulators to MMC adapters */
|
||||
- omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
|
||||
}
|
||||
|
||||
static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index 99be540..63d12a3 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -321,10 +321,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters */
|
||||
- omap3stalker_vmmc1_supply.dev = mmc[0].dev;
|
||||
- omap3stalker_vsim_supply.dev = mmc[0].dev;
|
||||
-
|
||||
/*
|
||||
* Most GPIOs are for USB OTG. Some are mostly sent to
|
||||
* the P2 connector; notably LEDA for the LCD backlight.
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index ab5c37d..c80e2c3 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -137,10 +137,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters */
|
||||
- touchbook_vmmc1_supply.dev = mmc[0].dev;
|
||||
- touchbook_vsim_supply.dev = mmc[0].dev;
|
||||
-
|
||||
/* REVISIT: need ehci-omap hooks for external VBUS
|
||||
* power switch and overcurrent detect
|
||||
*/
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 30c7556..031a9a6 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -417,8 +417,6 @@ static int overo_twl_gpio_setup(struct device *dev,
|
||||
{
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- overo_vmmc1_supply.dev = mmc[0].dev;
|
||||
-
|
||||
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
|
||||
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
|
||||
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
index cb012e1..8495f82 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
@@ -270,13 +270,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
|
||||
mmc[0].gpio_cd = gpio + 0;
|
||||
omap2_hsmmc_init(mmc);
|
||||
|
||||
- /* link regulators to MMC adapters ... we "know" the
|
||||
- * regulators will be set up only *after* we return.
|
||||
- */
|
||||
- zoom_vmmc1_supply.dev = mmc[0].dev;
|
||||
- zoom_vsim_supply.dev = mmc[0].dev;
|
||||
- zoom_vmmc2_supply.dev = mmc[1].dev;
|
||||
-
|
||||
ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
|
||||
"lcd enable");
|
||||
if (ret)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-802
@@ -1,802 +0,0 @@
|
||||
From 5edd966fdcf04f3166c1b7028215e502ba7d5275 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 17 May 2011 03:51:26 -0700
|
||||
Subject: [PATCH 003/149] omap: Use separate init_irq functions to avoid cpu_is_omap tests early
|
||||
|
||||
This allows us to remove cpu_is_omap calls from init_irq functions.
|
||||
There should not be any need for cpu_is_omap calls as at this point.
|
||||
During the timer init we only care about SoC generation, and not about
|
||||
subrevisions.
|
||||
|
||||
The main reason for the patch is that we want to initialize only
|
||||
minimal omap specific code from the init_early call.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap1/board-ams-delta.c | 2 +-
|
||||
arch/arm/mach-omap1/board-fsample.c | 2 +-
|
||||
arch/arm/mach-omap1/board-generic.c | 2 +-
|
||||
arch/arm/mach-omap1/board-h2.c | 2 +-
|
||||
arch/arm/mach-omap1/board-h3.c | 2 +-
|
||||
arch/arm/mach-omap1/board-htcherald.c | 2 +-
|
||||
arch/arm/mach-omap1/board-innovator.c | 2 +-
|
||||
arch/arm/mach-omap1/board-nokia770.c | 2 +-
|
||||
arch/arm/mach-omap1/board-osk.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmte.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmtt.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmz71.c | 2 +-
|
||||
arch/arm/mach-omap1/board-perseus2.c | 2 +-
|
||||
arch/arm/mach-omap1/board-sx1.c | 2 +-
|
||||
arch/arm/mach-omap1/board-voiceblue.c | 2 +-
|
||||
arch/arm/mach-omap1/irq.c | 2 +-
|
||||
arch/arm/mach-omap2/board-2430sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-3430sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-3630sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-am3517crane.c | 2 +-
|
||||
arch/arm/mach-omap2/board-am3517evm.c | 2 +-
|
||||
arch/arm/mach-omap2/board-apollon.c | 2 +-
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 2 +-
|
||||
arch/arm/mach-omap2/board-cm-t3517.c | 2 +-
|
||||
arch/arm/mach-omap2/board-devkit8000.c | 2 +-
|
||||
arch/arm/mach-omap2/board-generic.c | 2 +-
|
||||
arch/arm/mach-omap2/board-h4.c | 2 +-
|
||||
arch/arm/mach-omap2/board-igep0020.c | 4 +-
|
||||
arch/arm/mach-omap2/board-ldp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-n8x0.c | 6 ++--
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3logic.c | 4 +-
|
||||
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
|
||||
arch/arm/mach-omap2/board-overo.c | 2 +-
|
||||
arch/arm/mach-omap2/board-rm680.c | 2 +-
|
||||
arch/arm/mach-omap2/board-rx51.c | 2 +-
|
||||
arch/arm/mach-omap2/board-ti8168evm.c | 7 +-----
|
||||
arch/arm/mach-omap2/board-zoom.c | 4 +-
|
||||
arch/arm/mach-omap2/io.c | 17 +--------------
|
||||
arch/arm/mach-omap2/irq.c | 32 ++++++++++++++++++---------
|
||||
arch/arm/mach-omap2/omap4-common.c | 10 ++++----
|
||||
arch/arm/plat-omap/include/plat/irqs.h | 6 ++++-
|
||||
45 files changed, 78 insertions(+), 84 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
|
||||
index f49ce85..e3caef8 100644
|
||||
--- a/arch/arm/mach-omap1/board-ams-delta.c
|
||||
+++ b/arch/arm/mach-omap1/board-ams-delta.c
|
||||
@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value)
|
||||
static void __init ams_delta_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static struct map_desc ams_delta_io_desc[] __initdata = {
|
||||
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
|
||||
index 87f173d..eaff305 100644
|
||||
--- a/arch/arm/mach-omap1/board-fsample.c
|
||||
+++ b/arch/arm/mach-omap1/board-fsample.c
|
||||
@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void)
|
||||
static void __init omap_fsample_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
||||
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
|
||||
index 23f4ab9..3fd6b40 100644
|
||||
--- a/arch/arm/mach-omap1/board-generic.c
|
||||
+++ b/arch/arm/mach-omap1/board-generic.c
|
||||
@@ -31,7 +31,7 @@
|
||||
static void __init omap_generic_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
/* assume no Mini-AB port */
|
||||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
|
||||
index ba3bd09..8147b04 100644
|
||||
--- a/arch/arm/mach-omap1/board-h2.c
|
||||
+++ b/arch/arm/mach-omap1/board-h2.c
|
||||
@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
|
||||
static void __init h2_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static struct omap_usb_config h2_usb_config __initdata = {
|
||||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
|
||||
index ac48677..1b448f6 100644
|
||||
--- a/arch/arm/mach-omap1/board-h3.c
|
||||
+++ b/arch/arm/mach-omap1/board-h3.c
|
||||
@@ -439,7 +439,7 @@ static void __init h3_init(void)
|
||||
static void __init h3_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static void __init h3_map_io(void)
|
||||
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
|
||||
index ba05a51..1bd4d8e 100644
|
||||
--- a/arch/arm/mach-omap1/board-htcherald.c
|
||||
+++ b/arch/arm/mach-omap1/board-htcherald.c
|
||||
@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void)
|
||||
{
|
||||
printk(KERN_INFO "htcherald_init_irq.\n");
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
MACHINE_START(HERALD, "HTC Herald")
|
||||
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
|
||||
index 2d9b8cb..5926b0c 100644
|
||||
--- a/arch/arm/mach-omap1/board-innovator.c
|
||||
+++ b/arch/arm/mach-omap1/board-innovator.c
|
||||
@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void)
|
||||
static void __init innovator_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP15XX
|
||||
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
|
||||
index cfd0849..e3cf21d 100644
|
||||
--- a/arch/arm/mach-omap1/board-nokia770.c
|
||||
+++ b/arch/arm/mach-omap1/board-nokia770.c
|
||||
@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void)
|
||||
omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
|
||||
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static const unsigned int nokia770_keymap[] = {
|
||||
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
|
||||
index e68dfde..1e7823d 100644
|
||||
--- a/arch/arm/mach-omap1/board-osk.c
|
||||
+++ b/arch/arm/mach-omap1/board-osk.c
|
||||
@@ -282,7 +282,7 @@ static void __init osk_init_cf(void)
|
||||
static void __init osk_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static struct omap_usb_config osk_usb_config __initdata = {
|
||||
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
|
||||
index c9d38f4..8b6a881 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmte.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmte.c
|
||||
@@ -62,7 +62,7 @@
|
||||
static void __init omap_palmte_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static const unsigned int palmte_keymap[] = {
|
||||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
|
||||
index f04f2d3..f2de43d 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmtt.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmtt.c
|
||||
@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = {
|
||||
static void __init omap_palmtt_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static struct omap_usb_config palmtt_usb_config __initdata = {
|
||||
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
|
||||
index 45f01d2..6665d2d 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmz71.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmz71.c
|
||||
@@ -61,7 +61,7 @@ static void __init
|
||||
omap_palmz71_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static const unsigned int palmz71_keymap[] = {
|
||||
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
|
||||
index 3c8ee84..7f019e5 100644
|
||||
--- a/arch/arm/mach-omap1/board-perseus2.c
|
||||
+++ b/arch/arm/mach-omap1/board-perseus2.c
|
||||
@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void)
|
||||
static void __init omap_perseus2_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
/* Only FPGA needs to be mapped here. All others are done with ioremap */
|
||||
static struct map_desc omap_perseus2_io_desc[] __initdata = {
|
||||
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
|
||||
index 0ad781d..24f0f7b 100644
|
||||
--- a/arch/arm/mach-omap1/board-sx1.c
|
||||
+++ b/arch/arm/mach-omap1/board-sx1.c
|
||||
@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void)
|
||||
static void __init omap_sx1_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
/*----------------------------------------*/
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
|
||||
index 65d2420..98826e2 100644
|
||||
--- a/arch/arm/mach-omap1/board-voiceblue.c
|
||||
+++ b/arch/arm/mach-omap1/board-voiceblue.c
|
||||
@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = {
|
||||
static void __init voiceblue_init_irq(void)
|
||||
{
|
||||
omap1_init_common_hw();
|
||||
- omap_init_irq();
|
||||
+ omap1_init_irq();
|
||||
}
|
||||
|
||||
static void __init voiceblue_map_io(void)
|
||||
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
|
||||
index 5d3da7a..e2b9c90 100644
|
||||
--- a/arch/arm/mach-omap1/irq.c
|
||||
+++ b/arch/arm/mach-omap1/irq.c
|
||||
@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = {
|
||||
.irq_set_wake = omap_wake_irq,
|
||||
};
|
||||
|
||||
-void __init omap_init_irq(void)
|
||||
+void __init omap1_init_irq(void)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
|
||||
index 5de6eac..45cabc5 100644
|
||||
--- a/arch/arm/mach-omap2/board-2430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-2430sdp.c
|
||||
@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap_2430sdp_map_io,
|
||||
.init_early = omap_2430sdp_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = omap_2430sdp_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
index 5dac974..85b207f 100644
|
||||
--- a/arch/arm/mach-omap2/board-3430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
@@ -804,7 +804,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap_3430sdp_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap_3430sdp_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
|
||||
index a5933cc..2ec2d76 100644
|
||||
--- a/arch/arm/mach-omap2/board-3630sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3630sdp.c
|
||||
@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap_sdp_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap_sdp_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
index 5e438a7..0bed0a4 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517crane.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = am3517_crane_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = am3517_crane_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
|
||||
index 63af417..0db0fb8 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517evm.c
|
||||
@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = am3517_evm_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = am3517_evm_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
|
||||
index b124bdf..93576c8 100644
|
||||
--- a/arch/arm/mach-omap2/board-apollon.c
|
||||
+++ b/arch/arm/mach-omap2/board-apollon.c
|
||||
@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap_apollon_map_io,
|
||||
.init_early = omap_apollon_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = omap_apollon_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index ceb581e..43b1de5 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -644,7 +644,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = cm_t35_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = cm_t35_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
index c3a9fd3..8f15222 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
@@ -304,7 +304,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = cm_t3517_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = cm_t3517_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
index ead9c1d..73f3a22 100644
|
||||
--- a/arch/arm/mach-omap2/board-devkit8000.c
|
||||
+++ b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
@@ -440,7 +440,7 @@ static void __init devkit8000_init_early(void)
|
||||
|
||||
static void __init devkit8000_init_irq(void)
|
||||
{
|
||||
- omap_init_irq();
|
||||
+ omap3_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
#endif
|
||||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
|
||||
index 73e3c31..ccd503a 100644
|
||||
--- a/arch/arm/mach-omap2/board-generic.c
|
||||
+++ b/arch/arm/mach-omap2/board-generic.c
|
||||
@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap_generic_map_io,
|
||||
.init_early = omap_generic_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
|
||||
index bac7933..2e16d6c 100644
|
||||
--- a/arch/arm/mach-omap2/board-h4.c
|
||||
+++ b/arch/arm/mach-omap2/board-h4.c
|
||||
@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void)
|
||||
|
||||
static void __init omap_h4_init_irq(void)
|
||||
{
|
||||
- omap_init_irq();
|
||||
+ omap2_init_irq();
|
||||
}
|
||||
|
||||
static struct at24_platform_data m24c01 = {
|
||||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
|
||||
index 84d2846..f22a76a 100644
|
||||
--- a/arch/arm/mach-omap2/board-igep0020.c
|
||||
+++ b/arch/arm/mach-omap2/board-igep0020.c
|
||||
@@ -706,7 +706,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = igep_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = igep_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
@@ -716,7 +716,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = igep_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = igep_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
|
||||
index 2d7e0ae..9671843 100644
|
||||
--- a/arch/arm/mach-omap2/board-ldp.c
|
||||
+++ b/arch/arm/mach-omap2/board-ldp.c
|
||||
@@ -348,7 +348,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap_ldp_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap_ldp_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
|
||||
index 8d74318..9c791a2 100644
|
||||
--- a/arch/arm/mach-omap2/board-n8x0.c
|
||||
+++ b/arch/arm/mach-omap2/board-n8x0.c
|
||||
@@ -699,7 +699,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_early = n8x0_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
@@ -709,7 +709,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_early = n8x0_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = n8x0_map_io,
|
||||
.init_early = n8x0_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 8ef0e19..eaead5e 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -483,7 +483,7 @@ static void __init omap3_beagle_init_early(void)
|
||||
|
||||
static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
- omap_init_irq();
|
||||
+ omap3_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
#endif
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index e2202dd..d39f53f 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -739,7 +739,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap3_evm_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap3_evm_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
index eaefb59..b63f1c2 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3logic.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
@@ -213,7 +213,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap3logic_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap3logic_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
@@ -222,7 +222,7 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap3logic_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap3logic_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
index 130a278..1d90b90 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
@@ -650,7 +650,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap3pandora_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap3pandora_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index 63d12a3..dfa1401 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -491,7 +491,7 @@ static void __init omap3_stalker_init_early(void)
|
||||
|
||||
static void __init omap3_stalker_init_irq(void)
|
||||
{
|
||||
- omap_init_irq();
|
||||
+ omap3_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
#endif
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index c80e2c3..ae97910 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -371,7 +371,7 @@ static void __init omap3_touchbook_init_early(void)
|
||||
|
||||
static void __init omap3_touchbook_init_irq(void)
|
||||
{
|
||||
- omap_init_irq();
|
||||
+ omap3_init_irq();
|
||||
#ifdef CONFIG_OMAP_32K_TIMER
|
||||
omap2_gp_clockevent_set_gptimer(12);
|
||||
#endif
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 031a9a6..e3928f23 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -615,7 +615,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = overo_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = overo_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
|
||||
index 42d10b1..9c3d115 100644
|
||||
--- a/arch/arm/mach-omap2/board-rm680.c
|
||||
+++ b/arch/arm/mach-omap2/board-rm680.c
|
||||
@@ -163,7 +163,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = rm680_map_io,
|
||||
.init_early = rm680_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = rm680_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
|
||||
index fec4cac..ee35e4e 100644
|
||||
--- a/arch/arm/mach-omap2/board-rx51.c
|
||||
+++ b/arch/arm/mach-omap2/board-rx51.c
|
||||
@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
|
||||
.reserve = rx51_reserve,
|
||||
.map_io = rx51_map_io,
|
||||
.init_early = rx51_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = rx51_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
index 09fa7bf..713c20f 100644
|
||||
--- a/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void)
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
||||
-static void __init ti8168_evm_init_irq(void)
|
||||
-{
|
||||
- omap_init_irq();
|
||||
-}
|
||||
-
|
||||
static void __init ti8168_evm_init(void)
|
||||
{
|
||||
omap_serial_init();
|
||||
@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
|
||||
.boot_params = 0x80000100,
|
||||
.map_io = ti8168_evm_map_io,
|
||||
.init_early = ti8168_init_early,
|
||||
- .init_irq = ti8168_evm_init_irq,
|
||||
+ .init_irq = ti816x_init_irq,
|
||||
.timer = &omap_timer,
|
||||
.init_machine = ti8168_evm_init,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
|
||||
index 4b133d7..97a3f0b 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom.c
|
||||
@@ -137,7 +137,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap_zoom_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
|
||||
.reserve = omap_reserve,
|
||||
.map_io = omap3_map_io,
|
||||
.init_early = omap_zoom_init_early,
|
||||
- .init_irq = omap_init_irq,
|
||||
+ .init_irq = omap3_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
.timer = &omap_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
|
||||
index 441e79d..2ce1ce6 100644
|
||||
--- a/arch/arm/mach-omap2/io.c
|
||||
+++ b/arch/arm/mach-omap2/io.c
|
||||
@@ -333,23 +333,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
|
||||
return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
|
||||
}
|
||||
|
||||
+/* See irq.c, omap4-common.c and entry-macro.S */
|
||||
void __iomem *omap_irq_base;
|
||||
|
||||
-/*
|
||||
- * Initialize asm_irq_base for entry-macro.S
|
||||
- */
|
||||
-static inline void omap_irq_base_init(void)
|
||||
-{
|
||||
- if (cpu_is_omap24xx())
|
||||
- omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
|
||||
- else if (cpu_is_omap34xx())
|
||||
- omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
|
||||
- else if (cpu_is_omap44xx())
|
||||
- omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
|
||||
- else
|
||||
- pr_err("Could not initialize omap_irq_base\n");
|
||||
-}
|
||||
-
|
||||
void __init omap2_init_common_infrastructure(void)
|
||||
{
|
||||
u8 postsetup_state;
|
||||
@@ -422,7 +408,6 @@ void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
|
||||
_omap2_init_reprogram_sdrc();
|
||||
}
|
||||
|
||||
- omap_irq_base_init();
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
|
||||
index 3af2b7a..3a12f75 100644
|
||||
--- a/arch/arm/mach-omap2/irq.c
|
||||
+++ b/arch/arm/mach-omap2/irq.c
|
||||
@@ -141,25 +141,20 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
|
||||
IRQ_NOREQUEST | IRQ_NOPROBE, 0);
|
||||
}
|
||||
|
||||
-void __init omap_init_irq(void)
|
||||
+static void __init omap_init_irq(u32 base, int nr_irqs)
|
||||
{
|
||||
unsigned long nr_of_irqs = 0;
|
||||
unsigned int nr_banks = 0;
|
||||
int i, j;
|
||||
|
||||
+ omap_irq_base = ioremap(base, SZ_4K);
|
||||
+ if (WARN_ON(!omap_irq_base))
|
||||
+ return;
|
||||
+
|
||||
for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
|
||||
- unsigned long base = 0;
|
||||
struct omap_irq_bank *bank = irq_banks + i;
|
||||
|
||||
- if (cpu_is_omap24xx())
|
||||
- base = OMAP24XX_IC_BASE;
|
||||
- else if (cpu_is_omap34xx())
|
||||
- base = OMAP34XX_IC_BASE;
|
||||
-
|
||||
- BUG_ON(!base);
|
||||
-
|
||||
- if (cpu_is_ti816x())
|
||||
- bank->nr_irqs = 128;
|
||||
+ bank->nr_irqs = nr_irqs;
|
||||
|
||||
/* Static mapping, never released */
|
||||
bank->base_reg = ioremap(base, SZ_4K);
|
||||
@@ -181,6 +176,21 @@ void __init omap_init_irq(void)
|
||||
nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
|
||||
}
|
||||
|
||||
+void __init omap2_init_irq(void)
|
||||
+{
|
||||
+ omap_init_irq(OMAP24XX_IC_BASE, 96);
|
||||
+}
|
||||
+
|
||||
+void __init omap3_init_irq(void)
|
||||
+{
|
||||
+ omap_init_irq(OMAP34XX_IC_BASE, 96);
|
||||
+}
|
||||
+
|
||||
+void __init ti816x_init_irq(void)
|
||||
+{
|
||||
+ omap_init_irq(OMAP34XX_IC_BASE, 128);
|
||||
+}
|
||||
+
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
|
||||
index 9ef8c29..35ac3e5 100644
|
||||
--- a/arch/arm/mach-omap2/omap4-common.c
|
||||
+++ b/arch/arm/mach-omap2/omap4-common.c
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <asm/hardware/gic.h>
|
||||
#include <asm/hardware/cache-l2x0.h>
|
||||
|
||||
+#include <plat/irqs.h>
|
||||
+
|
||||
#include <mach/hardware.h>
|
||||
#include <mach/omap4-common.h>
|
||||
|
||||
@@ -31,17 +33,15 @@ void __iomem *gic_dist_base_addr;
|
||||
|
||||
void __init gic_init_irq(void)
|
||||
{
|
||||
- void __iomem *gic_cpu_base;
|
||||
-
|
||||
/* Static mapping, never released */
|
||||
gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
|
||||
BUG_ON(!gic_dist_base_addr);
|
||||
|
||||
/* Static mapping, never released */
|
||||
- gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
|
||||
- BUG_ON(!gic_cpu_base);
|
||||
+ omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
|
||||
+ BUG_ON(!omap_irq_base);
|
||||
|
||||
- gic_init(0, 29, gic_dist_base_addr, gic_cpu_base);
|
||||
+ gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CACHE_L2X0
|
||||
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
|
||||
index 5a25098..c884320 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/irqs.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/irqs.h
|
||||
@@ -428,7 +428,11 @@
|
||||
#define INTCPS_NR_IRQS 96
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
-extern void omap_init_irq(void);
|
||||
+extern void __iomem *omap_irq_base;
|
||||
+void omap1_init_irq(void);
|
||||
+void omap2_init_irq(void);
|
||||
+void omap3_init_irq(void);
|
||||
+void ti816x_init_irq(void);
|
||||
extern int omap_irq_pending(void);
|
||||
void omap_intc_save_context(void);
|
||||
void omap_intc_restore_context(void);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-689
@@ -1,689 +0,0 @@
|
||||
From b623b767d19edcc2d08909b044e1ab57956d9d49 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:48 -0700
|
||||
Subject: [PATCH 004/149] omap: Set separate timer init functions to avoid cpu_is_omap tests
|
||||
|
||||
This is needed for the following patches so we can initialize the
|
||||
rest of the hardware timers later on.
|
||||
|
||||
As with the init_irq calls, there's no need to do cpu_is_omap calls
|
||||
during the timer init as we only care about the major omap generation.
|
||||
This means that we can initialize the sys_timer with the .timer
|
||||
entries alone.
|
||||
|
||||
Note that for now we just set stubs for the various sys_timer entries
|
||||
that will get populated in a later patch. The following patches will
|
||||
also remove the omap_dm_timer_init calls and change the init for the
|
||||
rest of the hardware timers to happen with an arch_initcall.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap1/board-ams-delta.c | 2 +-
|
||||
arch/arm/mach-omap1/board-fsample.c | 2 +-
|
||||
arch/arm/mach-omap1/board-generic.c | 2 +-
|
||||
arch/arm/mach-omap1/board-h2.c | 2 +-
|
||||
arch/arm/mach-omap1/board-h3.c | 2 +-
|
||||
arch/arm/mach-omap1/board-htcherald.c | 2 +-
|
||||
arch/arm/mach-omap1/board-innovator.c | 2 +-
|
||||
arch/arm/mach-omap1/board-nokia770.c | 2 +-
|
||||
arch/arm/mach-omap1/board-osk.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmte.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmtt.c | 2 +-
|
||||
arch/arm/mach-omap1/board-palmz71.c | 2 +-
|
||||
arch/arm/mach-omap1/board-perseus2.c | 2 +-
|
||||
arch/arm/mach-omap1/board-sx1.c | 2 +-
|
||||
arch/arm/mach-omap1/board-voiceblue.c | 2 +-
|
||||
arch/arm/mach-omap1/time.c | 6 ++--
|
||||
arch/arm/mach-omap2/board-2430sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-3430sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-3630sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-4430sdp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-am3517crane.c | 2 +-
|
||||
arch/arm/mach-omap2/board-am3517evm.c | 2 +-
|
||||
arch/arm/mach-omap2/board-apollon.c | 2 +-
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 2 +-
|
||||
arch/arm/mach-omap2/board-cm-t3517.c | 2 +-
|
||||
arch/arm/mach-omap2/board-devkit8000.c | 2 +-
|
||||
arch/arm/mach-omap2/board-generic.c | 2 +-
|
||||
arch/arm/mach-omap2/board-h4.c | 2 +-
|
||||
arch/arm/mach-omap2/board-igep0020.c | 4 +-
|
||||
arch/arm/mach-omap2/board-ldp.c | 2 +-
|
||||
arch/arm/mach-omap2/board-n8x0.c | 6 ++--
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3logic.c | 4 +-
|
||||
arch/arm/mach-omap2/board-omap3pandora.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 2 +-
|
||||
arch/arm/mach-omap2/board-omap4panda.c | 2 +-
|
||||
arch/arm/mach-omap2/board-overo.c | 2 +-
|
||||
arch/arm/mach-omap2/board-rm680.c | 2 +-
|
||||
arch/arm/mach-omap2/board-rx51.c | 2 +-
|
||||
arch/arm/mach-omap2/board-ti8168evm.c | 2 +-
|
||||
arch/arm/mach-omap2/board-zoom.c | 4 +-
|
||||
arch/arm/mach-omap2/timer-gp.c | 41 +++++++++++++++++++++-------
|
||||
arch/arm/plat-omap/include/plat/common.h | 6 +++-
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 1 -
|
||||
46 files changed, 86 insertions(+), 62 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
|
||||
index e3caef8..312ea6b 100644
|
||||
--- a/arch/arm/mach-omap1/board-ams-delta.c
|
||||
+++ b/arch/arm/mach-omap1/board-ams-delta.c
|
||||
@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = ams_delta_init_irq,
|
||||
.init_machine = ams_delta_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
|
||||
EXPORT_SYMBOL(ams_delta_latch1_write);
|
||||
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
|
||||
index eaff305..a6b1bea 100644
|
||||
--- a/arch/arm/mach-omap1/board-fsample.c
|
||||
+++ b/arch/arm/mach-omap1/board-fsample.c
|
||||
@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_fsample_init_irq,
|
||||
.init_machine = omap_fsample_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
|
||||
index 3fd6b40..04fc356 100644
|
||||
--- a/arch/arm/mach-omap1/board-generic.c
|
||||
+++ b/arch/arm/mach-omap1/board-generic.c
|
||||
@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_generic_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
|
||||
index 8147b04..cb7fb1a 100644
|
||||
--- a/arch/arm/mach-omap1/board-h2.c
|
||||
+++ b/arch/arm/mach-omap1/board-h2.c
|
||||
@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = h2_init_irq,
|
||||
.init_machine = h2_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
|
||||
index 1b448f6..31f3487 100644
|
||||
--- a/arch/arm/mach-omap1/board-h3.c
|
||||
+++ b/arch/arm/mach-omap1/board-h3.c
|
||||
@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = h3_init_irq,
|
||||
.init_machine = h3_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
|
||||
index 1bd4d8e..36e06ea 100644
|
||||
--- a/arch/arm/mach-omap1/board-htcherald.c
|
||||
+++ b/arch/arm/mach-omap1/board-htcherald.c
|
||||
@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = htcherald_init_irq,
|
||||
.init_machine = htcherald_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
|
||||
index 5926b0c..0b1ba46 100644
|
||||
--- a/arch/arm/mach-omap1/board-innovator.c
|
||||
+++ b/arch/arm/mach-omap1/board-innovator.c
|
||||
@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = innovator_init_irq,
|
||||
.init_machine = innovator_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
|
||||
index e3cf21d..5469ce2 100644
|
||||
--- a/arch/arm/mach-omap1/board-nokia770.c
|
||||
+++ b/arch/arm/mach-omap1/board-nokia770.c
|
||||
@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_nokia770_init_irq,
|
||||
.init_machine = omap_nokia770_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
|
||||
index 1e7823d..b08a213 100644
|
||||
--- a/arch/arm/mach-omap1/board-osk.c
|
||||
+++ b/arch/arm/mach-omap1/board-osk.c
|
||||
@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = osk_init_irq,
|
||||
.init_machine = osk_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
|
||||
index 8b6a881..459cb6b 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmte.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmte.c
|
||||
@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_palmte_init_irq,
|
||||
.init_machine = omap_palmte_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
|
||||
index f2de43d..b214f45 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmtt.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmtt.c
|
||||
@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_palmtt_init_irq,
|
||||
.init_machine = omap_palmtt_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
|
||||
index 6665d2d..9b0ea48 100644
|
||||
--- a/arch/arm/mach-omap1/board-palmz71.c
|
||||
+++ b/arch/arm/mach-omap1/board-palmz71.c
|
||||
@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_palmz71_init_irq,
|
||||
.init_machine = omap_palmz71_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
|
||||
index 7f019e5..67acd41 100644
|
||||
--- a/arch/arm/mach-omap1/board-perseus2.c
|
||||
+++ b/arch/arm/mach-omap1/board-perseus2.c
|
||||
@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_perseus2_init_irq,
|
||||
.init_machine = omap_perseus2_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
|
||||
index 24f0f7b..9c3b7c5 100644
|
||||
--- a/arch/arm/mach-omap1/board-sx1.c
|
||||
+++ b/arch/arm/mach-omap1/board-sx1.c
|
||||
@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = omap_sx1_init_irq,
|
||||
.init_machine = omap_sx1_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
|
||||
index 98826e2..036edc0e 100644
|
||||
--- a/arch/arm/mach-omap1/board-voiceblue.c
|
||||
+++ b/arch/arm/mach-omap1/board-voiceblue.c
|
||||
@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
|
||||
.reserve = omap_reserve,
|
||||
.init_irq = voiceblue_init_irq,
|
||||
.init_machine = voiceblue_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap1_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
|
||||
index 03e1e10..a183777 100644
|
||||
--- a/arch/arm/mach-omap1/time.c
|
||||
+++ b/arch/arm/mach-omap1/time.c
|
||||
@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void)
|
||||
* Timer initialization
|
||||
* ---------------------------------------------------------------------------
|
||||
*/
|
||||
-static void __init omap_timer_init(void)
|
||||
+static void __init omap1_timer_init(void)
|
||||
{
|
||||
if (omap_32k_timer_usable()) {
|
||||
preferred_sched_clock_init(1);
|
||||
@@ -307,6 +307,6 @@ static void __init omap_timer_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
-struct sys_timer omap_timer = {
|
||||
- .init = omap_timer_init,
|
||||
+struct sys_timer omap1_timer = {
|
||||
+ .init = omap1_timer_init,
|
||||
};
|
||||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
|
||||
index 45cabc5..2028464 100644
|
||||
--- a/arch/arm/mach-omap2/board-2430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-2430sdp.c
|
||||
@@ -262,5 +262,5 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
|
||||
.init_early = omap_2430sdp_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = omap_2430sdp_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
index 85b207f..12fae21 100644
|
||||
--- a/arch/arm/mach-omap2/board-3430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
@@ -806,5 +806,5 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
|
||||
.init_early = omap_3430sdp_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap_3430sdp_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
|
||||
index 2ec2d76..e4f37b5 100644
|
||||
--- a/arch/arm/mach-omap2/board-3630sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3630sdp.c
|
||||
@@ -221,5 +221,5 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
|
||||
.init_early = omap_sdp_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap_sdp_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
index 39a8062..e8caced 100644
|
||||
--- a/arch/arm/mach-omap2/board-4430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
@@ -768,5 +768,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
|
||||
.init_early = omap_4430sdp_init_early,
|
||||
.init_irq = gic_init_irq,
|
||||
.init_machine = omap_4430sdp_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap4_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
index 0bed0a4..5f2b55f 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517crane.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517crane.c
|
||||
@@ -106,5 +106,5 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
|
||||
.init_early = am3517_crane_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = am3517_crane_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
|
||||
index 0db0fb8..f3006c3 100644
|
||||
--- a/arch/arm/mach-omap2/board-am3517evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am3517evm.c
|
||||
@@ -496,5 +496,5 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
|
||||
.init_early = am3517_evm_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = am3517_evm_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
|
||||
index 93576c8..7021170 100644
|
||||
--- a/arch/arm/mach-omap2/board-apollon.c
|
||||
+++ b/arch/arm/mach-omap2/board-apollon.c
|
||||
@@ -356,5 +356,5 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
|
||||
.init_early = omap_apollon_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = omap_apollon_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index 43b1de5..1a18d3b 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -646,5 +646,5 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
|
||||
.init_early = cm_t35_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = cm_t35_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
index 8f15222..aa67240 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
@@ -306,5 +306,5 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
|
||||
.init_early = cm_t3517_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = cm_t3517_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
index 73f3a22..46d144d 100644
|
||||
--- a/arch/arm/mach-omap2/board-devkit8000.c
|
||||
+++ b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
@@ -709,5 +709,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
|
||||
.init_early = devkit8000_init_early,
|
||||
.init_irq = devkit8000_init_irq,
|
||||
.init_machine = devkit8000_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_secure_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
|
||||
index ccd503a..c6ecf60 100644
|
||||
--- a/arch/arm/mach-omap2/board-generic.c
|
||||
+++ b/arch/arm/mach-omap2/board-generic.c
|
||||
@@ -72,5 +72,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
||||
.init_early = omap_generic_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
|
||||
index 2e16d6c..45de2b3 100644
|
||||
--- a/arch/arm/mach-omap2/board-h4.c
|
||||
+++ b/arch/arm/mach-omap2/board-h4.c
|
||||
@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
|
||||
.init_early = omap_h4_init_early,
|
||||
.init_irq = omap_h4_init_irq,
|
||||
.init_machine = omap_h4_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
|
||||
index f22a76a..f683835 100644
|
||||
--- a/arch/arm/mach-omap2/board-igep0020.c
|
||||
+++ b/arch/arm/mach-omap2/board-igep0020.c
|
||||
@@ -708,7 +708,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
|
||||
.init_early = igep_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = igep_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(IGEP0030, "IGEP OMAP3 module")
|
||||
@@ -718,5 +718,5 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
|
||||
.init_early = igep_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = igep_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
|
||||
index 9671843..5d4328f 100644
|
||||
--- a/arch/arm/mach-omap2/board-ldp.c
|
||||
+++ b/arch/arm/mach-omap2/board-ldp.c
|
||||
@@ -350,5 +350,5 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
|
||||
.init_early = omap_ldp_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap_ldp_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
|
||||
index 9c791a2..e11f0c5 100644
|
||||
--- a/arch/arm/mach-omap2/board-n8x0.c
|
||||
+++ b/arch/arm/mach-omap2/board-n8x0.c
|
||||
@@ -701,7 +701,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
|
||||
.init_early = n8x0_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(NOKIA_N810, "Nokia N810")
|
||||
@@ -711,7 +711,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
|
||||
.init_early = n8x0_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
|
||||
@@ -721,5 +721,5 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
|
||||
.init_early = n8x0_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = n8x0_init_machine,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index eaead5e..9ee16f6 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -596,5 +596,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
|
||||
.init_early = omap3_beagle_init_early,
|
||||
.init_irq = omap3_beagle_init_irq,
|
||||
.init_machine = omap3_beagle_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_secure_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index d39f53f..6f957ed 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -741,5 +741,5 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
|
||||
.init_early = omap3_evm_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap3_evm_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
index b63f1c2..469259a 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3logic.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
@@ -215,7 +215,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
|
||||
.init_early = omap3logic_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap3logic_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
|
||||
@@ -224,5 +224,5 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
|
||||
.init_early = omap3logic_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap3logic_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
index 1d90b90..d4ea940 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
@@ -652,5 +652,5 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
|
||||
.init_early = omap3pandora_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap3pandora_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index dfa1401..2fa8fae 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -557,5 +557,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
|
||||
.init_early = omap3_stalker_init_early,
|
||||
.init_irq = omap3_stalker_init_irq,
|
||||
.init_machine = omap3_stalker_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_secure_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index ae97910..8c71fd2 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -449,5 +449,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
|
||||
.init_early = omap3_touchbook_init_early,
|
||||
.init_irq = omap3_touchbook_init_irq,
|
||||
.init_machine = omap3_touchbook_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_secure_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
index 6d2372b..dc1d6dc 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap4panda.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
@@ -712,5 +712,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
|
||||
.init_early = omap4_panda_init_early,
|
||||
.init_irq = gic_init_irq,
|
||||
.init_machine = omap4_panda_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap4_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index e3928f23..1bf2f39 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -617,5 +617,5 @@ MACHINE_START(OVERO, "Gumstix Overo")
|
||||
.init_early = overo_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = overo_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
|
||||
index 9c3d115..54dceb1 100644
|
||||
--- a/arch/arm/mach-omap2/board-rm680.c
|
||||
+++ b/arch/arm/mach-omap2/board-rm680.c
|
||||
@@ -165,5 +165,5 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
|
||||
.init_early = rm680_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = rm680_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
|
||||
index ee35e4e..5ea142f 100644
|
||||
--- a/arch/arm/mach-omap2/board-rx51.c
|
||||
+++ b/arch/arm/mach-omap2/board-rx51.c
|
||||
@@ -162,5 +162,5 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
|
||||
.init_early = rx51_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = rx51_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
index 713c20f..a85d5b0 100644
|
||||
--- a/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
|
||||
@@ -52,6 +52,6 @@ MACHINE_START(TI8168EVM, "ti8168evm")
|
||||
.map_io = ti8168_evm_map_io,
|
||||
.init_early = ti8168_init_early,
|
||||
.init_irq = ti816x_init_irq,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
.init_machine = ti8168_evm_init,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
|
||||
index 97a3f0b..8a98c3c 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom.c
|
||||
@@ -139,7 +139,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
|
||||
.init_early = omap_zoom_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
|
||||
MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
|
||||
@@ -149,5 +149,5 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
|
||||
.init_early = omap_zoom_init_early,
|
||||
.init_irq = omap3_init_irq,
|
||||
.init_machine = omap_zoom_init,
|
||||
- .timer = &omap_timer,
|
||||
+ .timer = &omap3_timer,
|
||||
MACHINE_END
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index 3b9cf85..a0d8e83 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -247,20 +247,41 @@ static void __init omap2_gp_clocksource_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
-static void __init omap2_gp_timer_init(void)
|
||||
+#define OMAP_SYS_TIMER_INIT(name) \
|
||||
+static void __init omap##name##_timer_init(void) \
|
||||
+{ \
|
||||
+ omap_dm_timer_init(); \
|
||||
+ omap2_gp_clockevent_init(); \
|
||||
+ omap2_gp_clocksource_init(); \
|
||||
+}
|
||||
+
|
||||
+#define OMAP_SYS_TIMER(name) \
|
||||
+struct sys_timer omap##name##_timer = { \
|
||||
+ .init = omap##name##_timer_init, \
|
||||
+};
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP2
|
||||
+OMAP_SYS_TIMER_INIT(2)
|
||||
+OMAP_SYS_TIMER(2)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP3
|
||||
+OMAP_SYS_TIMER_INIT(3)
|
||||
+OMAP_SYS_TIMER(3)
|
||||
+OMAP_SYS_TIMER_INIT(3_secure)
|
||||
+OMAP_SYS_TIMER(3_secure)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP4
|
||||
+static void __init omap4_timer_init(void)
|
||||
{
|
||||
#ifdef CONFIG_LOCAL_TIMERS
|
||||
- if (cpu_is_omap44xx()) {
|
||||
- twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
|
||||
- BUG_ON(!twd_base);
|
||||
- }
|
||||
+ twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
|
||||
+ BUG_ON(!twd_base);
|
||||
#endif
|
||||
omap_dm_timer_init();
|
||||
-
|
||||
omap2_gp_clockevent_init();
|
||||
omap2_gp_clocksource_init();
|
||||
}
|
||||
-
|
||||
-struct sys_timer omap_timer = {
|
||||
- .init = omap2_gp_timer_init,
|
||||
-};
|
||||
+OMAP_SYS_TIMER(4)
|
||||
+#endif
|
||||
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
|
||||
index 5288130..4564cc6 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/common.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/common.h
|
||||
@@ -34,7 +34,11 @@
|
||||
struct sys_timer;
|
||||
|
||||
extern void omap_map_common_io(void);
|
||||
-extern struct sys_timer omap_timer;
|
||||
+extern struct sys_timer omap1_timer;
|
||||
+extern struct sys_timer omap2_timer;
|
||||
+extern struct sys_timer omap3_timer;
|
||||
+extern struct sys_timer omap3_secure_timer;
|
||||
+extern struct sys_timer omap4_timer;
|
||||
extern bool omap_32k_timer_init(void);
|
||||
extern int __init omap_init_clocksource_32k(void);
|
||||
extern unsigned long long notrace omap_32k_sched_clock(void);
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index d6c70d2..330bd17 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -57,7 +57,6 @@
|
||||
#define OMAP_TIMER_IP_VERSION_1 0x1
|
||||
struct omap_dm_timer;
|
||||
extern struct omap_dm_timer *gptimer_wakeup;
|
||||
-extern struct sys_timer omap_timer;
|
||||
struct clk;
|
||||
|
||||
int omap_dm_timer_init(void);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-287
@@ -1,287 +0,0 @@
|
||||
From 99573b33f37eede2d3d36ae71c34f5d72ccdc672 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:48 -0700
|
||||
Subject: [PATCH 005/149] omap: Move dmtimer defines to dmtimer.h
|
||||
|
||||
These will be needed when dmtimer platform init code gets split
|
||||
for omap1 and omap2+. These will also be needed for separate
|
||||
sys_timer init and driver init for the rest of the hardware timers
|
||||
in the following patches. No functional changes.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/plat-omap/dmtimer.c | 121 ----------------------------
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 125 +++++++++++++++++++++++++++++
|
||||
2 files changed, 125 insertions(+), 121 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
|
||||
index ee9f6eb..dfdc3b2 100644
|
||||
--- a/arch/arm/plat-omap/dmtimer.c
|
||||
+++ b/arch/arm/plat-omap/dmtimer.c
|
||||
@@ -41,127 +41,6 @@
|
||||
#include <plat/dmtimer.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
-/* register offsets */
|
||||
-#define _OMAP_TIMER_ID_OFFSET 0x00
|
||||
-#define _OMAP_TIMER_OCP_CFG_OFFSET 0x10
|
||||
-#define _OMAP_TIMER_SYS_STAT_OFFSET 0x14
|
||||
-#define _OMAP_TIMER_STAT_OFFSET 0x18
|
||||
-#define _OMAP_TIMER_INT_EN_OFFSET 0x1c
|
||||
-#define _OMAP_TIMER_WAKEUP_EN_OFFSET 0x20
|
||||
-#define _OMAP_TIMER_CTRL_OFFSET 0x24
|
||||
-#define OMAP_TIMER_CTRL_GPOCFG (1 << 14)
|
||||
-#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13)
|
||||
-#define OMAP_TIMER_CTRL_PT (1 << 12)
|
||||
-#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8)
|
||||
-#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8)
|
||||
-#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8)
|
||||
-#define OMAP_TIMER_CTRL_SCPWM (1 << 7)
|
||||
-#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */
|
||||
-#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */
|
||||
-#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* prescaler value shift */
|
||||
-#define OMAP_TIMER_CTRL_POSTED (1 << 2)
|
||||
-#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */
|
||||
-#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */
|
||||
-#define _OMAP_TIMER_COUNTER_OFFSET 0x28
|
||||
-#define _OMAP_TIMER_LOAD_OFFSET 0x2c
|
||||
-#define _OMAP_TIMER_TRIGGER_OFFSET 0x30
|
||||
-#define _OMAP_TIMER_WRITE_PEND_OFFSET 0x34
|
||||
-#define WP_NONE 0 /* no write pending bit */
|
||||
-#define WP_TCLR (1 << 0)
|
||||
-#define WP_TCRR (1 << 1)
|
||||
-#define WP_TLDR (1 << 2)
|
||||
-#define WP_TTGR (1 << 3)
|
||||
-#define WP_TMAR (1 << 4)
|
||||
-#define WP_TPIR (1 << 5)
|
||||
-#define WP_TNIR (1 << 6)
|
||||
-#define WP_TCVR (1 << 7)
|
||||
-#define WP_TOCR (1 << 8)
|
||||
-#define WP_TOWR (1 << 9)
|
||||
-#define _OMAP_TIMER_MATCH_OFFSET 0x38
|
||||
-#define _OMAP_TIMER_CAPTURE_OFFSET 0x3c
|
||||
-#define _OMAP_TIMER_IF_CTRL_OFFSET 0x40
|
||||
-#define _OMAP_TIMER_CAPTURE2_OFFSET 0x44 /* TCAR2, 34xx only */
|
||||
-#define _OMAP_TIMER_TICK_POS_OFFSET 0x48 /* TPIR, 34xx only */
|
||||
-#define _OMAP_TIMER_TICK_NEG_OFFSET 0x4c /* TNIR, 34xx only */
|
||||
-#define _OMAP_TIMER_TICK_COUNT_OFFSET 0x50 /* TCVR, 34xx only */
|
||||
-#define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET 0x54 /* TOCR, 34xx only */
|
||||
-#define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58 /* TOWR, 34xx only */
|
||||
-
|
||||
-/* register offsets with the write pending bit encoded */
|
||||
-#define WPSHIFT 16
|
||||
-
|
||||
-#define OMAP_TIMER_ID_REG (_OMAP_TIMER_ID_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_OCP_CFG_REG (_OMAP_TIMER_OCP_CFG_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_SYS_STAT_REG (_OMAP_TIMER_SYS_STAT_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_STAT_REG (_OMAP_TIMER_STAT_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_INT_EN_REG (_OMAP_TIMER_INT_EN_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \
|
||||
- | (WP_TCLR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \
|
||||
- | (WP_TCRR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \
|
||||
- | (WP_TLDR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \
|
||||
- | (WP_TTGR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \
|
||||
- | (WP_TMAR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \
|
||||
- | (WP_NONE << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \
|
||||
- | (WP_TPIR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \
|
||||
- | (WP_TNIR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \
|
||||
- | (WP_TCVR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TICK_INT_MASK_SET_REG \
|
||||
- (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
|
||||
-
|
||||
-#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \
|
||||
- (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
|
||||
-
|
||||
-struct omap_dm_timer {
|
||||
- unsigned long phys_base;
|
||||
- int irq;
|
||||
-#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
- struct clk *iclk, *fclk;
|
||||
-#endif
|
||||
- void __iomem *io_base;
|
||||
- unsigned reserved:1;
|
||||
- unsigned enabled:1;
|
||||
- unsigned posted:1;
|
||||
-};
|
||||
-
|
||||
static int dm_timer_count;
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP1
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index 330bd17..3203105 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -92,5 +92,130 @@ void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value
|
||||
|
||||
int omap_dm_timers_active(void);
|
||||
|
||||
+/*
|
||||
+ * Do not use the defines below, they are not needed. They should be only
|
||||
+ * used by dmtimer.c and sys_timer related code.
|
||||
+ */
|
||||
+
|
||||
+/* register offsets */
|
||||
+#define _OMAP_TIMER_ID_OFFSET 0x00
|
||||
+#define _OMAP_TIMER_OCP_CFG_OFFSET 0x10
|
||||
+#define _OMAP_TIMER_SYS_STAT_OFFSET 0x14
|
||||
+#define _OMAP_TIMER_STAT_OFFSET 0x18
|
||||
+#define _OMAP_TIMER_INT_EN_OFFSET 0x1c
|
||||
+#define _OMAP_TIMER_WAKEUP_EN_OFFSET 0x20
|
||||
+#define _OMAP_TIMER_CTRL_OFFSET 0x24
|
||||
+#define OMAP_TIMER_CTRL_GPOCFG (1 << 14)
|
||||
+#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13)
|
||||
+#define OMAP_TIMER_CTRL_PT (1 << 12)
|
||||
+#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8)
|
||||
+#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8)
|
||||
+#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8)
|
||||
+#define OMAP_TIMER_CTRL_SCPWM (1 << 7)
|
||||
+#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */
|
||||
+#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */
|
||||
+#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* prescaler value shift */
|
||||
+#define OMAP_TIMER_CTRL_POSTED (1 << 2)
|
||||
+#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */
|
||||
+#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */
|
||||
+#define _OMAP_TIMER_COUNTER_OFFSET 0x28
|
||||
+#define _OMAP_TIMER_LOAD_OFFSET 0x2c
|
||||
+#define _OMAP_TIMER_TRIGGER_OFFSET 0x30
|
||||
+#define _OMAP_TIMER_WRITE_PEND_OFFSET 0x34
|
||||
+#define WP_NONE 0 /* no write pending bit */
|
||||
+#define WP_TCLR (1 << 0)
|
||||
+#define WP_TCRR (1 << 1)
|
||||
+#define WP_TLDR (1 << 2)
|
||||
+#define WP_TTGR (1 << 3)
|
||||
+#define WP_TMAR (1 << 4)
|
||||
+#define WP_TPIR (1 << 5)
|
||||
+#define WP_TNIR (1 << 6)
|
||||
+#define WP_TCVR (1 << 7)
|
||||
+#define WP_TOCR (1 << 8)
|
||||
+#define WP_TOWR (1 << 9)
|
||||
+#define _OMAP_TIMER_MATCH_OFFSET 0x38
|
||||
+#define _OMAP_TIMER_CAPTURE_OFFSET 0x3c
|
||||
+#define _OMAP_TIMER_IF_CTRL_OFFSET 0x40
|
||||
+#define _OMAP_TIMER_CAPTURE2_OFFSET 0x44 /* TCAR2, 34xx only */
|
||||
+#define _OMAP_TIMER_TICK_POS_OFFSET 0x48 /* TPIR, 34xx only */
|
||||
+#define _OMAP_TIMER_TICK_NEG_OFFSET 0x4c /* TNIR, 34xx only */
|
||||
+#define _OMAP_TIMER_TICK_COUNT_OFFSET 0x50 /* TCVR, 34xx only */
|
||||
+#define _OMAP_TIMER_TICK_INT_MASK_SET_OFFSET 0x54 /* TOCR, 34xx only */
|
||||
+#define _OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET 0x58 /* TOWR, 34xx only */
|
||||
+
|
||||
+/* register offsets with the write pending bit encoded */
|
||||
+#define WPSHIFT 16
|
||||
+
|
||||
+#define OMAP_TIMER_ID_REG (_OMAP_TIMER_ID_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_OCP_CFG_REG (_OMAP_TIMER_OCP_CFG_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_SYS_STAT_REG (_OMAP_TIMER_SYS_STAT_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_STAT_REG (_OMAP_TIMER_STAT_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_INT_EN_REG (_OMAP_TIMER_INT_EN_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_WAKEUP_EN_REG (_OMAP_TIMER_WAKEUP_EN_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_CTRL_REG (_OMAP_TIMER_CTRL_OFFSET \
|
||||
+ | (WP_TCLR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_COUNTER_REG (_OMAP_TIMER_COUNTER_OFFSET \
|
||||
+ | (WP_TCRR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_LOAD_REG (_OMAP_TIMER_LOAD_OFFSET \
|
||||
+ | (WP_TLDR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TRIGGER_REG (_OMAP_TIMER_TRIGGER_OFFSET \
|
||||
+ | (WP_TTGR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_WRITE_PEND_REG (_OMAP_TIMER_WRITE_PEND_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_MATCH_REG (_OMAP_TIMER_MATCH_OFFSET \
|
||||
+ | (WP_TMAR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_CAPTURE_REG (_OMAP_TIMER_CAPTURE_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_IF_CTRL_REG (_OMAP_TIMER_IF_CTRL_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_CAPTURE2_REG (_OMAP_TIMER_CAPTURE2_OFFSET \
|
||||
+ | (WP_NONE << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TICK_POS_REG (_OMAP_TIMER_TICK_POS_OFFSET \
|
||||
+ | (WP_TPIR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TICK_NEG_REG (_OMAP_TIMER_TICK_NEG_OFFSET \
|
||||
+ | (WP_TNIR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TICK_COUNT_REG (_OMAP_TIMER_TICK_COUNT_OFFSET \
|
||||
+ | (WP_TCVR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TICK_INT_MASK_SET_REG \
|
||||
+ (_OMAP_TIMER_TICK_INT_MASK_SET_OFFSET | (WP_TOCR << WPSHIFT))
|
||||
+
|
||||
+#define OMAP_TIMER_TICK_INT_MASK_COUNT_REG \
|
||||
+ (_OMAP_TIMER_TICK_INT_MASK_COUNT_OFFSET | (WP_TOWR << WPSHIFT))
|
||||
+
|
||||
+struct omap_dm_timer {
|
||||
+ unsigned long phys_base;
|
||||
+ int irq;
|
||||
+#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
+ struct clk *iclk, *fclk;
|
||||
+#endif
|
||||
+ void __iomem *io_base;
|
||||
+ unsigned reserved:1;
|
||||
+ unsigned enabled:1;
|
||||
+ unsigned posted:1;
|
||||
+};
|
||||
|
||||
#endif /* __ASM_ARCH_DMTIMER_H */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-323
@@ -1,323 +0,0 @@
|
||||
From 902f3165afa284d4bd6ff22db7654318c98a5ce0 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:48 -0700
|
||||
Subject: [PATCH 006/149] omap: Make a subset of dmtimer functions into inline functions
|
||||
|
||||
This will allow us to share the code between system timer and
|
||||
dmtimer device driver code without having to initialize all the
|
||||
dmtimers early. This change will also make the timer_set_next_event
|
||||
more efficient as the inline functions will optimize the code
|
||||
better for the timer reprogramming.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/plat-omap/dmtimer.c | 78 ++++---------------
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 119 +++++++++++++++++++++++++++++
|
||||
2 files changed, 136 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
|
||||
index dfdc3b2..7c5cb4e 100644
|
||||
--- a/arch/arm/plat-omap/dmtimer.c
|
||||
+++ b/arch/arm/plat-omap/dmtimer.c
|
||||
@@ -170,11 +170,7 @@ static spinlock_t dm_timer_lock;
|
||||
*/
|
||||
static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg)
|
||||
{
|
||||
- if (timer->posted)
|
||||
- while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
|
||||
- & (reg >> WPSHIFT))
|
||||
- cpu_relax();
|
||||
- return readl(timer->io_base + (reg & 0xff));
|
||||
+ return __omap_dm_timer_read(timer->io_base, reg, timer->posted);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -186,11 +182,7 @@ static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, u32 reg)
|
||||
static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
|
||||
u32 value)
|
||||
{
|
||||
- if (timer->posted)
|
||||
- while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
|
||||
- & (reg >> WPSHIFT))
|
||||
- cpu_relax();
|
||||
- writel(value, timer->io_base + (reg & 0xff));
|
||||
+ __omap_dm_timer_write(timer->io_base, reg, value, timer->posted);
|
||||
}
|
||||
|
||||
static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
|
||||
@@ -209,7 +201,7 @@ static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
|
||||
|
||||
static void omap_dm_timer_reset(struct omap_dm_timer *timer)
|
||||
{
|
||||
- u32 l;
|
||||
+ int autoidle = 0, wakeup = 0;
|
||||
|
||||
if (!cpu_class_is_omap2() || timer != &dm_timers[0]) {
|
||||
omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
|
||||
@@ -217,28 +209,21 @@ static void omap_dm_timer_reset(struct omap_dm_timer *timer)
|
||||
}
|
||||
omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ);
|
||||
|
||||
- l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
|
||||
- l |= 0x02 << 3; /* Set to smart-idle mode */
|
||||
- l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */
|
||||
-
|
||||
/* Enable autoidle on OMAP2 / OMAP3 */
|
||||
if (cpu_is_omap24xx() || cpu_is_omap34xx())
|
||||
- l |= 0x1 << 0;
|
||||
+ autoidle = 1;
|
||||
|
||||
/*
|
||||
* Enable wake-up on OMAP2 CPUs.
|
||||
*/
|
||||
if (cpu_class_is_omap2())
|
||||
- l |= 1 << 2;
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
|
||||
+ wakeup = 1;
|
||||
|
||||
- /* Match hardware reset default of posted mode */
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG,
|
||||
- OMAP_TIMER_CTRL_POSTED);
|
||||
+ __omap_dm_timer_reset(timer->io_base, autoidle, wakeup);
|
||||
timer->posted = 1;
|
||||
}
|
||||
|
||||
-static void omap_dm_timer_prepare(struct omap_dm_timer *timer)
|
||||
+void omap_dm_timer_prepare(struct omap_dm_timer *timer)
|
||||
{
|
||||
omap_dm_timer_enable(timer);
|
||||
omap_dm_timer_reset(timer);
|
||||
@@ -410,25 +395,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
|
||||
|
||||
void omap_dm_timer_stop(struct omap_dm_timer *timer)
|
||||
{
|
||||
- u32 l;
|
||||
+ unsigned long rate = 0;
|
||||
|
||||
- l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
|
||||
- if (l & OMAP_TIMER_CTRL_ST) {
|
||||
- l &= ~0x1;
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
|
||||
#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
- /* Readback to make sure write has completed */
|
||||
- omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
|
||||
- /*
|
||||
- * Wait for functional clock period x 3.5 to make sure that
|
||||
- * timer is stopped
|
||||
- */
|
||||
- udelay(3500000 / clk_get_rate(timer->fclk) + 1);
|
||||
+ rate = clk_get_rate(timer->fclk);
|
||||
#endif
|
||||
- }
|
||||
- /* Ack possibly pending interrupt */
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
|
||||
- OMAP_TIMER_INT_OVERFLOW);
|
||||
+
|
||||
+ __omap_dm_timer_stop(timer->io_base, timer->posted, rate);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
|
||||
|
||||
@@ -451,22 +424,11 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
|
||||
|
||||
int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
|
||||
{
|
||||
- int ret = -EINVAL;
|
||||
-
|
||||
if (source < 0 || source >= 3)
|
||||
return -EINVAL;
|
||||
|
||||
- clk_disable(timer->fclk);
|
||||
- ret = clk_set_parent(timer->fclk, dm_source_clocks[source]);
|
||||
- clk_enable(timer->fclk);
|
||||
-
|
||||
- /*
|
||||
- * When the functional clock disappears, too quick writes seem
|
||||
- * to cause an abort. XXX Is this still necessary?
|
||||
- */
|
||||
- __delay(300000);
|
||||
-
|
||||
- return ret;
|
||||
+ return __omap_dm_timer_set_source(timer->fclk,
|
||||
+ dm_source_clocks[source]);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_set_source);
|
||||
|
||||
@@ -504,8 +466,7 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
|
||||
}
|
||||
l |= OMAP_TIMER_CTRL_ST;
|
||||
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load);
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
|
||||
+ __omap_dm_timer_load_start(timer->io_base, l, load, timer->posted);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_set_load_start);
|
||||
|
||||
@@ -558,8 +519,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_set_prescaler);
|
||||
void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
|
||||
unsigned int value)
|
||||
{
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value);
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, value);
|
||||
+ __omap_dm_timer_int_enable(timer->io_base, value);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable);
|
||||
|
||||
@@ -575,17 +535,13 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_read_status);
|
||||
|
||||
void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
|
||||
{
|
||||
- omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value);
|
||||
+ __omap_dm_timer_write_status(timer->io_base, value);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_write_status);
|
||||
|
||||
unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
|
||||
{
|
||||
- unsigned int l;
|
||||
-
|
||||
- l = omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG);
|
||||
-
|
||||
- return l;
|
||||
+ return __omap_dm_timer_read_counter(timer->io_base, timer->posted);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timer_read_counter);
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index 3203105..54664a7 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -32,6 +32,9 @@
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/delay.h>
|
||||
+
|
||||
#ifndef __ASM_ARCH_DMTIMER_H
|
||||
#define __ASM_ARCH_DMTIMER_H
|
||||
|
||||
@@ -218,4 +221,120 @@ struct omap_dm_timer {
|
||||
unsigned posted:1;
|
||||
};
|
||||
|
||||
+void omap_dm_timer_prepare(struct omap_dm_timer *timer);
|
||||
+
|
||||
+static inline u32 __omap_dm_timer_read(void __iomem *base, u32 reg,
|
||||
+ int posted)
|
||||
+{
|
||||
+ if (posted)
|
||||
+ while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
|
||||
+ & (reg >> WPSHIFT))
|
||||
+ cpu_relax();
|
||||
+
|
||||
+ return __raw_readl(base + (reg & 0xff));
|
||||
+}
|
||||
+
|
||||
+static inline void __omap_dm_timer_write(void __iomem *base, u32 reg, u32 val,
|
||||
+ int posted)
|
||||
+{
|
||||
+ if (posted)
|
||||
+ while (__raw_readl(base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))
|
||||
+ & (reg >> WPSHIFT))
|
||||
+ cpu_relax();
|
||||
+
|
||||
+ __raw_writel(val, base + (reg & 0xff));
|
||||
+}
|
||||
+
|
||||
+/* Assumes the source clock has been set by caller */
|
||||
+static inline void __omap_dm_timer_reset(void __iomem *base, int autoidle,
|
||||
+ int wakeup)
|
||||
+{
|
||||
+ u32 l;
|
||||
+
|
||||
+ l = __omap_dm_timer_read(base, OMAP_TIMER_OCP_CFG_REG, 0);
|
||||
+ l |= 0x02 << 3; /* Set to smart-idle mode */
|
||||
+ l |= 0x2 << 8; /* Set clock activity to perserve f-clock on idle */
|
||||
+
|
||||
+ if (autoidle)
|
||||
+ l |= 0x1 << 0;
|
||||
+
|
||||
+ if (wakeup)
|
||||
+ l |= 1 << 2;
|
||||
+
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_OCP_CFG_REG, l, 0);
|
||||
+
|
||||
+ /* Match hardware reset default of posted mode */
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_IF_CTRL_REG,
|
||||
+ OMAP_TIMER_CTRL_POSTED, 0);
|
||||
+}
|
||||
+
|
||||
+static inline int __omap_dm_timer_set_source(struct clk *timer_fck,
|
||||
+ struct clk *parent)
|
||||
+{
|
||||
+ int ret;
|
||||
+
|
||||
+ clk_disable(timer_fck);
|
||||
+ ret = clk_set_parent(timer_fck, parent);
|
||||
+ clk_enable(timer_fck);
|
||||
+
|
||||
+ /*
|
||||
+ * When the functional clock disappears, too quick writes seem
|
||||
+ * to cause an abort. XXX Is this still necessary?
|
||||
+ */
|
||||
+ __delay(300000);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static inline void __omap_dm_timer_stop(void __iomem *base, int posted,
|
||||
+ unsigned long rate)
|
||||
+{
|
||||
+ u32 l;
|
||||
+
|
||||
+ l = __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted);
|
||||
+ if (l & OMAP_TIMER_CTRL_ST) {
|
||||
+ l &= ~0x1;
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, l, posted);
|
||||
+#ifdef CONFIG_ARCH_OMAP2PLUS
|
||||
+ /* Readback to make sure write has completed */
|
||||
+ __omap_dm_timer_read(base, OMAP_TIMER_CTRL_REG, posted);
|
||||
+ /*
|
||||
+ * Wait for functional clock period x 3.5 to make sure that
|
||||
+ * timer is stopped
|
||||
+ */
|
||||
+ udelay(3500000 / rate + 1);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
+ /* Ack possibly pending interrupt */
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG,
|
||||
+ OMAP_TIMER_INT_OVERFLOW, 0);
|
||||
+}
|
||||
+
|
||||
+static inline void __omap_dm_timer_load_start(void __iomem *base, u32 ctrl,
|
||||
+ unsigned int load, int posted)
|
||||
+{
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_COUNTER_REG, load, posted);
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_CTRL_REG, ctrl, posted);
|
||||
+}
|
||||
+
|
||||
+static inline void __omap_dm_timer_int_enable(void __iomem *base,
|
||||
+ unsigned int value)
|
||||
+{
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_INT_EN_REG, value, 0);
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_WAKEUP_EN_REG, value, 0);
|
||||
+}
|
||||
+
|
||||
+static inline unsigned int __omap_dm_timer_read_counter(void __iomem *base,
|
||||
+ int posted)
|
||||
+{
|
||||
+ return __omap_dm_timer_read(base, OMAP_TIMER_COUNTER_REG, posted);
|
||||
+}
|
||||
+
|
||||
+static inline void __omap_dm_timer_write_status(void __iomem *base,
|
||||
+ unsigned int value)
|
||||
+{
|
||||
+ __omap_dm_timer_write(base, OMAP_TIMER_STAT_REG, value, 0);
|
||||
+}
|
||||
+
|
||||
#endif /* __ASM_ARCH_DMTIMER_H */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-279
@@ -1,279 +0,0 @@
|
||||
From 8f322fa141e55da412c5d73f07f93c1e02965522 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:48 -0700
|
||||
Subject: [PATCH 007/149] omap2+: Use dmtimer macros for clockevent
|
||||
|
||||
This patch makes timer-gp.c to use only a subset of dmtimer
|
||||
functions without the need to initialize dmtimer code early.
|
||||
|
||||
Also note that now with the inline functions, timer_set_next_event
|
||||
becomes more efficient in the lines of assembly code.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/timer-gp.c | 147 ++++++++++++++++++++++-------
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 1 +
|
||||
2 files changed, 113 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index a0d8e83..62c0d5c 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -45,10 +45,33 @@
|
||||
|
||||
#include "timer-gp.h"
|
||||
|
||||
+/* Parent clocks, eventually these will come from the clock framework */
|
||||
+
|
||||
+#define OMAP2_MPU_SOURCE "sys_ck"
|
||||
+#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE
|
||||
+#define OMAP4_MPU_SOURCE "sys_clkin_ck"
|
||||
+#define OMAP2_32K_SOURCE "func_32k_ck"
|
||||
+#define OMAP3_32K_SOURCE "omap_32k_fck"
|
||||
+#define OMAP4_32K_SOURCE "sys_32k_ck"
|
||||
+
|
||||
+#ifdef CONFIG_OMAP_32K_TIMER
|
||||
+#define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE
|
||||
+#define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE
|
||||
+#define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE
|
||||
+#define OMAP3_SECURE_TIMER 12
|
||||
+#else
|
||||
+#define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE
|
||||
+#define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE
|
||||
+#define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE
|
||||
+#define OMAP3_SECURE_TIMER 1
|
||||
+#endif
|
||||
|
||||
/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
|
||||
#define MAX_GPTIMER_ID 12
|
||||
|
||||
+/* Clockevent code */
|
||||
+
|
||||
+static struct omap_dm_timer clkev;
|
||||
static struct omap_dm_timer *gptimer;
|
||||
static struct clock_event_device clockevent_gpt;
|
||||
static u8 __initdata gptimer_id = 1;
|
||||
@@ -57,10 +80,9 @@ struct omap_dm_timer *gptimer_wakeup;
|
||||
|
||||
static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
- struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id;
|
||||
struct clock_event_device *evt = &clockevent_gpt;
|
||||
|
||||
- omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW);
|
||||
+ __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
|
||||
evt->event_handler(evt);
|
||||
return IRQ_HANDLED;
|
||||
@@ -75,7 +97,8 @@ static struct irqaction omap2_gp_timer_irq = {
|
||||
static int omap2_gp_timer_set_next_event(unsigned long cycles,
|
||||
struct clock_event_device *evt)
|
||||
{
|
||||
- omap_dm_timer_set_load_start(gptimer, 0, 0xffffffff - cycles);
|
||||
+ __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST,
|
||||
+ 0xffffffff - cycles, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -85,13 +108,18 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
|
||||
{
|
||||
u32 period;
|
||||
|
||||
- omap_dm_timer_stop(gptimer);
|
||||
+ __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate);
|
||||
|
||||
switch (mode) {
|
||||
case CLOCK_EVT_MODE_PERIODIC:
|
||||
- period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
|
||||
+ period = clkev.rate / HZ;
|
||||
period -= 1;
|
||||
- omap_dm_timer_set_load_start(gptimer, 1, 0xffffffff - period);
|
||||
+ /* Looks like we need to first set the load value separately */
|
||||
+ __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG,
|
||||
+ 0xffffffff - period, 1);
|
||||
+ __omap_dm_timer_load_start(clkev.io_base,
|
||||
+ OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
|
||||
+ 0xffffffff - period, 1);
|
||||
break;
|
||||
case CLOCK_EVT_MODE_ONESHOT:
|
||||
break;
|
||||
@@ -130,43 +158,89 @@ int __init omap2_gp_clockevent_set_gptimer(u8 id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void __init omap2_gp_clockevent_init(void)
|
||||
+static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
+ int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
{
|
||||
- u32 tick_rate;
|
||||
- int src;
|
||||
- char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */
|
||||
+ char name[10]; /* 10 = sizeof("gptXX_Xck0") */
|
||||
+ struct omap_hwmod *oh;
|
||||
+ size_t size;
|
||||
+ int res = 0;
|
||||
+
|
||||
+ sprintf(name, "timer%d", gptimer_id);
|
||||
+ omap_hwmod_setup_one(name);
|
||||
+ oh = omap_hwmod_lookup(name);
|
||||
+ if (!oh)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ timer->irq = oh->mpu_irqs[0].irq;
|
||||
+ timer->phys_base = oh->slaves[0]->addr->pa_start;
|
||||
+ size = oh->slaves[0]->addr->pa_end - timer->phys_base;
|
||||
+
|
||||
+ /* Static mapping, never released */
|
||||
+ timer->io_base = ioremap(timer->phys_base, size);
|
||||
+ if (!timer->io_base)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+ /* After the dmtimer is using hwmod these clocks won't be needed */
|
||||
+ sprintf(name, "gpt%d_fck", gptimer_id);
|
||||
+ timer->fclk = clk_get(NULL, name);
|
||||
+ if (IS_ERR(timer->fclk))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ sprintf(name, "gpt%d_ick", gptimer_id);
|
||||
+ timer->iclk = clk_get(NULL, name);
|
||||
+ if (IS_ERR(timer->iclk)) {
|
||||
+ clk_put(timer->fclk);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
|
||||
- inited = 1;
|
||||
+ omap_hwmod_enable(oh);
|
||||
+
|
||||
+ if (gptimer_id != 12) {
|
||||
+ struct clk *src;
|
||||
+
|
||||
+ src = clk_get(NULL, fck_source);
|
||||
+ if (IS_ERR(src)) {
|
||||
+ res = -EINVAL;
|
||||
+ } else {
|
||||
+ res = __omap_dm_timer_set_source(timer->fclk, src);
|
||||
+ if (IS_ERR_VALUE(res))
|
||||
+ pr_warning("%s: timer%i cannot set source\n",
|
||||
+ __func__, gptimer_id);
|
||||
+ clk_put(src);
|
||||
+ }
|
||||
+ }
|
||||
+ __omap_dm_timer_reset(timer->io_base, 1, 1);
|
||||
+ timer->posted = 1;
|
||||
+
|
||||
+ timer->rate = clk_get_rate(timer->fclk);
|
||||
|
||||
- sprintf(clockevent_hwmod_name, "timer%d", gptimer_id);
|
||||
- omap_hwmod_setup_one(clockevent_hwmod_name);
|
||||
+ timer->reserved = 1;
|
||||
|
||||
gptimer = omap_dm_timer_request_specific(gptimer_id);
|
||||
BUG_ON(gptimer == NULL);
|
||||
gptimer_wakeup = gptimer;
|
||||
|
||||
-#if defined(CONFIG_OMAP_32K_TIMER)
|
||||
- src = OMAP_TIMER_SRC_32_KHZ;
|
||||
-#else
|
||||
- src = OMAP_TIMER_SRC_SYS_CLK;
|
||||
- WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the "
|
||||
- "secure 32KiHz clock source\n");
|
||||
-#endif
|
||||
+ return res;
|
||||
+}
|
||||
|
||||
- if (gptimer_id != 12)
|
||||
- WARN(IS_ERR_VALUE(omap_dm_timer_set_source(gptimer, src)),
|
||||
- "timer-gp: omap_dm_timer_set_source() failed\n");
|
||||
+static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
+{
|
||||
+ int res;
|
||||
|
||||
- tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer));
|
||||
+ inited = 1;
|
||||
|
||||
- pr_info("OMAP clockevent source: GPTIMER%d at %u Hz\n",
|
||||
- gptimer_id, tick_rate);
|
||||
+ res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
|
||||
+ BUG_ON(res);
|
||||
|
||||
omap2_gp_timer_irq.dev_id = (void *)gptimer;
|
||||
- setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
|
||||
- omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
|
||||
+ setup_irq(clkev.irq, &omap2_gp_timer_irq);
|
||||
|
||||
- clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC,
|
||||
+ __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
+
|
||||
+ clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
|
||||
clockevent_gpt.shift);
|
||||
clockevent_gpt.max_delta_ns =
|
||||
clockevent_delta2ns(0xffffffff, &clockevent_gpt);
|
||||
@@ -176,6 +250,9 @@ static void __init omap2_gp_clockevent_init(void)
|
||||
|
||||
clockevent_gpt.cpumask = cpumask_of(0);
|
||||
clockevents_register_device(&clockevent_gpt);
|
||||
+
|
||||
+ pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
|
||||
+ gptimer_id, clkev.rate);
|
||||
}
|
||||
|
||||
/* Clocksource code */
|
||||
@@ -247,11 +324,11 @@ static void __init omap2_gp_clocksource_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
-#define OMAP_SYS_TIMER_INIT(name) \
|
||||
+#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src) \
|
||||
static void __init omap##name##_timer_init(void) \
|
||||
{ \
|
||||
omap_dm_timer_init(); \
|
||||
- omap2_gp_clockevent_init(); \
|
||||
+ omap2_gp_clockevent_init((clkev_nr), clkev_src); \
|
||||
omap2_gp_clocksource_init(); \
|
||||
}
|
||||
|
||||
@@ -261,14 +338,14 @@ struct sys_timer omap##name##_timer = { \
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP2
|
||||
-OMAP_SYS_TIMER_INIT(2)
|
||||
+OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE)
|
||||
OMAP_SYS_TIMER(2)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
-OMAP_SYS_TIMER_INIT(3)
|
||||
+OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE)
|
||||
OMAP_SYS_TIMER(3)
|
||||
-OMAP_SYS_TIMER_INIT(3_secure)
|
||||
+OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE)
|
||||
OMAP_SYS_TIMER(3_secure)
|
||||
#endif
|
||||
|
||||
@@ -280,7 +357,7 @@ static void __init omap4_timer_init(void)
|
||||
BUG_ON(!twd_base);
|
||||
#endif
|
||||
omap_dm_timer_init();
|
||||
- omap2_gp_clockevent_init();
|
||||
+ omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
|
||||
omap2_gp_clocksource_init();
|
||||
}
|
||||
OMAP_SYS_TIMER(4)
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index 54664a7..dd8b3ff 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -216,6 +216,7 @@ struct omap_dm_timer {
|
||||
struct clk *iclk, *fclk;
|
||||
#endif
|
||||
void __iomem *io_base;
|
||||
+ unsigned long rate;
|
||||
unsigned reserved:1;
|
||||
unsigned enabled:1;
|
||||
unsigned posted:1;
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-177
@@ -1,177 +0,0 @@
|
||||
From 6e1cacccf1349d97c83c7bc93e4d3c15e731c3ad Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:49 -0700
|
||||
Subject: [PATCH 008/149] omap2+: Remove gptimer_wakeup for now
|
||||
|
||||
This removes the support for setting the wake-up timer for debugging.
|
||||
|
||||
Later on we can reserve gptimer1 for PM code only and have similar
|
||||
functionality.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/pm-debug.c | 28 ----------------------------
|
||||
arch/arm/mach-omap2/pm.h | 6 ------
|
||||
arch/arm/mach-omap2/pm34xx.c | 4 ----
|
||||
arch/arm/mach-omap2/timer-gp.c | 8 +-------
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 1 -
|
||||
5 files changed, 1 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
|
||||
index e01da45..2c35bd3 100644
|
||||
--- a/arch/arm/mach-omap2/pm-debug.c
|
||||
+++ b/arch/arm/mach-omap2/pm-debug.c
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <plat/board.h>
|
||||
#include "powerdomain.h"
|
||||
#include "clockdomain.h"
|
||||
-#include <plat/dmtimer.h>
|
||||
#include <plat/omap-pm.h>
|
||||
|
||||
#include "cm2xxx_3xxx.h"
|
||||
@@ -41,8 +40,6 @@
|
||||
int omap2_pm_debug;
|
||||
u32 enable_off_mode;
|
||||
u32 sleep_while_idle;
|
||||
-u32 wakeup_timer_seconds;
|
||||
-u32 wakeup_timer_milliseconds;
|
||||
|
||||
#define DUMP_PRM_MOD_REG(mod, reg) \
|
||||
regs[reg_count].name = #mod "." #reg; \
|
||||
@@ -162,23 +159,6 @@ void omap2_pm_dump(int mode, int resume, unsigned int us)
|
||||
printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
|
||||
}
|
||||
|
||||
-void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds)
|
||||
-{
|
||||
- u32 tick_rate, cycles;
|
||||
-
|
||||
- if (!seconds && !milliseconds)
|
||||
- return;
|
||||
-
|
||||
- tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup));
|
||||
- cycles = tick_rate * seconds + tick_rate * milliseconds / 1000;
|
||||
- omap_dm_timer_stop(gptimer_wakeup);
|
||||
- omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles);
|
||||
-
|
||||
- pr_info("PM: Resume timer in %u.%03u secs"
|
||||
- " (%d ticks at %d ticks/sec.)\n",
|
||||
- seconds, milliseconds, cycles, tick_rate);
|
||||
-}
|
||||
-
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
@@ -576,9 +556,6 @@ static int option_set(void *data, u64 val)
|
||||
{
|
||||
u32 *option = data;
|
||||
|
||||
- if (option == &wakeup_timer_milliseconds && val >= 1000)
|
||||
- return -EINVAL;
|
||||
-
|
||||
*option = val;
|
||||
|
||||
if (option == &enable_off_mode) {
|
||||
@@ -641,11 +618,6 @@ static int pm_dbg_init(void)
|
||||
&enable_off_mode, &pm_dbg_option_fops);
|
||||
(void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
|
||||
&sleep_while_idle, &pm_dbg_option_fops);
|
||||
- (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
|
||||
- &wakeup_timer_seconds, &pm_dbg_option_fops);
|
||||
- (void) debugfs_create_file("wakeup_timer_milliseconds",
|
||||
- S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
|
||||
- &pm_dbg_option_fops);
|
||||
pm_dbg_init_done = 1;
|
||||
|
||||
return 0;
|
||||
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
|
||||
index 45bcfce..c3a367e 100644
|
||||
--- a/arch/arm/mach-omap2/pm.h
|
||||
+++ b/arch/arm/mach-omap2/pm.h
|
||||
@@ -60,19 +60,13 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
|
||||
extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
|
||||
extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
|
||||
|
||||
-extern u32 wakeup_timer_seconds;
|
||||
-extern u32 wakeup_timer_milliseconds;
|
||||
-extern struct omap_dm_timer *gptimer_wakeup;
|
||||
-
|
||||
#ifdef CONFIG_PM_DEBUG
|
||||
extern void omap2_pm_dump(int mode, int resume, unsigned int us);
|
||||
-extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds);
|
||||
extern int omap2_pm_debug;
|
||||
extern u32 enable_off_mode;
|
||||
extern u32 sleep_while_idle;
|
||||
#else
|
||||
#define omap2_pm_dump(mode, resume, us) do {} while (0);
|
||||
-#define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0);
|
||||
#define omap2_pm_debug 0
|
||||
#define enable_off_mode 0
|
||||
#define sleep_while_idle 0
|
||||
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
|
||||
index c155c9d..4cb636a 100644
|
||||
--- a/arch/arm/mach-omap2/pm34xx.c
|
||||
+++ b/arch/arm/mach-omap2/pm34xx.c
|
||||
@@ -534,10 +534,6 @@ static int omap3_pm_suspend(void)
|
||||
struct power_state *pwrst;
|
||||
int state, ret = 0;
|
||||
|
||||
- if (wakeup_timer_seconds || wakeup_timer_milliseconds)
|
||||
- omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
|
||||
- wakeup_timer_milliseconds);
|
||||
-
|
||||
/* Read current next_pwrsts */
|
||||
list_for_each_entry(pwrst, &pwrst_list, node)
|
||||
pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index 62c0d5c..578e9df 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -72,11 +72,9 @@
|
||||
/* Clockevent code */
|
||||
|
||||
static struct omap_dm_timer clkev;
|
||||
-static struct omap_dm_timer *gptimer;
|
||||
static struct clock_event_device clockevent_gpt;
|
||||
static u8 __initdata gptimer_id = 1;
|
||||
static u8 __initdata inited;
|
||||
-struct omap_dm_timer *gptimer_wakeup;
|
||||
|
||||
static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
@@ -218,10 +216,6 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
|
||||
timer->reserved = 1;
|
||||
|
||||
- gptimer = omap_dm_timer_request_specific(gptimer_id);
|
||||
- BUG_ON(gptimer == NULL);
|
||||
- gptimer_wakeup = gptimer;
|
||||
-
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -235,7 +229,7 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
|
||||
BUG_ON(res);
|
||||
|
||||
- omap2_gp_timer_irq.dev_id = (void *)gptimer;
|
||||
+ omap2_gp_timer_irq.dev_id = (void *)&clkev;
|
||||
setup_irq(clkev.irq, &omap2_gp_timer_irq);
|
||||
|
||||
__omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index dd8b3ff..8adcb18 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -59,7 +59,6 @@
|
||||
*/
|
||||
#define OMAP_TIMER_IP_VERSION_1 0x1
|
||||
struct omap_dm_timer;
|
||||
-extern struct omap_dm_timer *gptimer_wakeup;
|
||||
struct clk;
|
||||
|
||||
int omap_dm_timer_init(void);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-47
@@ -1,47 +0,0 @@
|
||||
From b3d437835cf2885fe7a8c6470ca7639e5c11850a Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Mon, 14 Feb 2011 12:16:36 +0530
|
||||
Subject: [PATCH 009/149] OMAP3+: SR: make notify independent of class
|
||||
|
||||
Interrupt notification mechanism of SmartReflex can be used by the
|
||||
choice of implementation of the class driver. For example, Class 2 and
|
||||
Class 1.5 of SmartReflex can both use the interrupt notification to
|
||||
identify the transition of voltage or other events.
|
||||
|
||||
Hence, the actual class does not matter for notifier. Let the class
|
||||
driver's handling decide how it should be used. SmartReflex driver
|
||||
should provide just the primitives.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/smartreflex.c | 6 ++----
|
||||
1 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
|
||||
index f5a6bc1..785ed4c 100644
|
||||
--- a/arch/arm/mach-omap2/smartreflex.c
|
||||
+++ b/arch/arm/mach-omap2/smartreflex.c
|
||||
@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data)
|
||||
sr_write_reg(sr_info, IRQSTATUS, status);
|
||||
}
|
||||
|
||||
- if (sr_class->class_type == SR_CLASS2 && sr_class->notify)
|
||||
+ if (sr_class->notify)
|
||||
sr_class->notify(sr_info->voltdm, status);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info)
|
||||
struct resource *mem;
|
||||
int ret = 0;
|
||||
|
||||
- if (sr_class->class_type == SR_CLASS2 &&
|
||||
- sr_class->notify_flags && sr_info->irq) {
|
||||
-
|
||||
+ if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
|
||||
name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name);
|
||||
if (name == NULL) {
|
||||
ret = -ENOMEM;
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
From 252ef25d54768a725289253c494e1f37a5eec526 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Mon, 14 Feb 2011 12:41:10 +0530
|
||||
Subject: [PATCH 010/149] OMAP3+: SR: disable interrupt by default
|
||||
|
||||
We will enable and disable interrupt on a need basis in the class
|
||||
driver. We need to keep the IRQ disabled by default else the
|
||||
forceupdate or vcbypass events could trigger events that we don't
|
||||
need/expect to handle.
|
||||
|
||||
This is a preparation for SmartReflex AVS class drivers such as
|
||||
class 2 and class 1.5 which would need to use interrupts. Existing
|
||||
SmartReflex AVS class 3 driver does not require to use interrupts
|
||||
and is not impacted by this change.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/smartreflex.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
|
||||
index 785ed4c..6b69ada 100644
|
||||
--- a/arch/arm/mach-omap2/smartreflex.c
|
||||
+++ b/arch/arm/mach-omap2/smartreflex.c
|
||||
@@ -268,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info)
|
||||
0, name, (void *)sr_info);
|
||||
if (ret)
|
||||
goto error;
|
||||
+ disable_irq(sr_info->irq);
|
||||
}
|
||||
|
||||
if (pdata && pdata->enable_on_init)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
From e060d73eef027063f687feae1c3d0ad2418a88aa Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Mon, 14 Feb 2011 21:14:17 +0530
|
||||
Subject: [PATCH 011/149] OMAP3+: SR: enable/disable SR only on need
|
||||
|
||||
Since we already know the state of the autocomp enablement, we can
|
||||
see if the requested state is different from the current state and
|
||||
enable/disable SR only on the need basis.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/smartreflex.c | 11 +++++++----
|
||||
1 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
|
||||
index 6b69ada..1a370b9 100644
|
||||
--- a/arch/arm/mach-omap2/smartreflex.c
|
||||
+++ b/arch/arm/mach-omap2/smartreflex.c
|
||||
@@ -807,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- if (!val)
|
||||
- sr_stop_vddautocomp(sr_info);
|
||||
- else
|
||||
- sr_start_vddautocomp(sr_info);
|
||||
+ /* control enable/disable only if there is a delta in value */
|
||||
+ if (sr_info->autocomp_active != val) {
|
||||
+ if (!val)
|
||||
+ sr_stop_vddautocomp(sr_info);
|
||||
+ else
|
||||
+ sr_start_vddautocomp(sr_info);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From d9d17d6ea5a56b81a7d6d134aeeeff6a3b9fbf88 Mon Sep 17 00:00:00 2001
|
||||
From: Nishanth Menon <nm@ti.com>
|
||||
Date: Mon, 14 Feb 2011 12:33:13 +0530
|
||||
Subject: [PATCH 012/149] OMAP3+: SR: fix cosmetic indentation
|
||||
|
||||
Error label case seems to have a 2 tab indentation when just 1 is
|
||||
necessary.
|
||||
|
||||
Signed-off-by: Nishanth Menon <nm@ti.com>
|
||||
Signed-off-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/smartreflex.c | 20 ++++++++++----------
|
||||
1 files changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
|
||||
index 1a370b9..be6add0 100644
|
||||
--- a/arch/arm/mach-omap2/smartreflex.c
|
||||
+++ b/arch/arm/mach-omap2/smartreflex.c
|
||||
@@ -277,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info)
|
||||
return ret;
|
||||
|
||||
error:
|
||||
- iounmap(sr_info->base);
|
||||
- mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
|
||||
- release_mem_region(mem->start, resource_size(mem));
|
||||
- list_del(&sr_info->node);
|
||||
- dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
|
||||
- "interrupt handler. Smartreflex will"
|
||||
- "not function as desired\n", __func__);
|
||||
- kfree(name);
|
||||
- kfree(sr_info);
|
||||
- return ret;
|
||||
+ iounmap(sr_info->base);
|
||||
+ mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
|
||||
+ release_mem_region(mem->start, resource_size(mem));
|
||||
+ list_del(&sr_info->node);
|
||||
+ dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
|
||||
+ "interrupt handler. Smartreflex will"
|
||||
+ "not function as desired\n", __func__);
|
||||
+ kfree(name);
|
||||
+ kfree(sr_info);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static void sr_v1_disable(struct omap_sr *sr)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-125
@@ -1,125 +0,0 @@
|
||||
From 8009544b2ea8ceba920455bb7e5e267cc78d3827 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:49 -0700
|
||||
Subject: [PATCH 013/149] omap2+: Reserve clocksource and timesource and initialize dmtimer later
|
||||
|
||||
There's no need to initialize the dmtimer framework early.
|
||||
Just mark the clocksource and timesource as reserved, and
|
||||
initialize dmtimer with an arch_initcall.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap1/timer32k.c | 4 ----
|
||||
arch/arm/mach-omap2/timer-gp.c | 6 ++++--
|
||||
arch/arm/plat-omap/dmtimer.c | 10 +++++++++-
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 3 +--
|
||||
4 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
|
||||
index 13d7b8f..96604a5 100644
|
||||
--- a/arch/arm/mach-omap1/timer32k.c
|
||||
+++ b/arch/arm/mach-omap1/timer32k.c
|
||||
@@ -183,10 +183,6 @@ static __init void omap_init_32k_timer(void)
|
||||
bool __init omap_32k_timer_init(void)
|
||||
{
|
||||
omap_init_clocksource_32k();
|
||||
-
|
||||
-#ifdef CONFIG_OMAP_DM_TIMER
|
||||
- omap_dm_timer_init();
|
||||
-#endif
|
||||
omap_init_32k_timer();
|
||||
|
||||
return true;
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index 578e9df..cf2ec85 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -69,6 +69,8 @@
|
||||
/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
|
||||
#define MAX_GPTIMER_ID 12
|
||||
|
||||
+u32 sys_timer_reserved;
|
||||
+
|
||||
/* Clockevent code */
|
||||
|
||||
static struct omap_dm_timer clkev;
|
||||
@@ -195,6 +197,8 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
|
||||
omap_hwmod_enable(oh);
|
||||
|
||||
+ sys_timer_reserved |= (1 << (gptimer_id - 1));
|
||||
+
|
||||
if (gptimer_id != 12) {
|
||||
struct clk *src;
|
||||
|
||||
@@ -321,7 +325,6 @@ static void __init omap2_gp_clocksource_init(void)
|
||||
#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src) \
|
||||
static void __init omap##name##_timer_init(void) \
|
||||
{ \
|
||||
- omap_dm_timer_init(); \
|
||||
omap2_gp_clockevent_init((clkev_nr), clkev_src); \
|
||||
omap2_gp_clocksource_init(); \
|
||||
}
|
||||
@@ -350,7 +353,6 @@ static void __init omap4_timer_init(void)
|
||||
twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
|
||||
BUG_ON(!twd_base);
|
||||
#endif
|
||||
- omap_dm_timer_init();
|
||||
omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
|
||||
omap2_gp_clocksource_init();
|
||||
}
|
||||
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
|
||||
index 7c5cb4e..8dfb818 100644
|
||||
--- a/arch/arm/plat-omap/dmtimer.c
|
||||
+++ b/arch/arm/plat-omap/dmtimer.c
|
||||
@@ -572,7 +572,7 @@ int omap_dm_timers_active(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(omap_dm_timers_active);
|
||||
|
||||
-int __init omap_dm_timer_init(void)
|
||||
+static int __init omap_dm_timer_init(void)
|
||||
{
|
||||
struct omap_dm_timer *timer;
|
||||
int i, map_size = SZ_8K; /* Module 4KB + L4 4KB except on omap1 */
|
||||
@@ -625,8 +625,16 @@ int __init omap_dm_timer_init(void)
|
||||
sprintf(clk_name, "gpt%d_fck", i + 1);
|
||||
timer->fclk = clk_get(NULL, clk_name);
|
||||
}
|
||||
+
|
||||
+ /* One or two timers may be set up early for sys_timer */
|
||||
+ if (sys_timer_reserved & (1 << i)) {
|
||||
+ timer->reserved = 1;
|
||||
+ timer->posted = 1;
|
||||
+ }
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+arch_initcall(omap_dm_timer_init);
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index 8adcb18..d0f3a2d 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -61,8 +61,6 @@
|
||||
struct omap_dm_timer;
|
||||
struct clk;
|
||||
|
||||
-int omap_dm_timer_init(void);
|
||||
-
|
||||
struct omap_dm_timer *omap_dm_timer_request(void);
|
||||
struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
|
||||
void omap_dm_timer_free(struct omap_dm_timer *timer);
|
||||
@@ -221,6 +219,7 @@ struct omap_dm_timer {
|
||||
unsigned posted:1;
|
||||
};
|
||||
|
||||
+extern u32 sys_timer_reserved;
|
||||
void omap_dm_timer_prepare(struct omap_dm_timer *timer);
|
||||
|
||||
static inline u32 __omap_dm_timer_read(void __iomem *base, u32 reg,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-163
@@ -1,163 +0,0 @@
|
||||
From 595da70cb0e039cbe04d9c7ce179883e6f8878c1 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:49 -0700
|
||||
Subject: [PATCH 014/149] omap2+: Use dmtimer macros for clocksource
|
||||
|
||||
Use dmtimer macros for clocksource. As with the clockevent,
|
||||
this allows us to initialize the rest of dmtimer code later on.
|
||||
|
||||
Note that eventually we will be initializing the timesource
|
||||
from init_early so sched_clock will work properly for
|
||||
CONFIG_PRINTK_TIME.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/timer-gp.c | 64 +++++++++++++++++++++----------------
|
||||
arch/arm/plat-omap/counter_32k.c | 2 +-
|
||||
2 files changed, 37 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index cf2ec85..2b8cb70 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -262,20 +262,22 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
* sync counter. See clocksource setup in plat-omap/counter_32k.c
|
||||
*/
|
||||
|
||||
-static void __init omap2_gp_clocksource_init(void)
|
||||
+static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
|
||||
{
|
||||
omap_init_clocksource_32k();
|
||||
}
|
||||
|
||||
#else
|
||||
+
|
||||
+static struct omap_dm_timer clksrc;
|
||||
+
|
||||
/*
|
||||
* clocksource
|
||||
*/
|
||||
static DEFINE_CLOCK_DATA(cd);
|
||||
-static struct omap_dm_timer *gpt_clocksource;
|
||||
static cycle_t clocksource_read_cycles(struct clocksource *cs)
|
||||
{
|
||||
- return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
|
||||
+ return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
}
|
||||
|
||||
static struct clocksource clocksource_gpt = {
|
||||
@@ -290,43 +292,48 @@ static void notrace dmtimer_update_sched_clock(void)
|
||||
{
|
||||
u32 cyc;
|
||||
|
||||
- cyc = omap_dm_timer_read_counter(gpt_clocksource);
|
||||
+ cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
|
||||
update_sched_clock(&cd, cyc, (u32)~0);
|
||||
}
|
||||
|
||||
-/* Setup free-running counter for clocksource */
|
||||
-static void __init omap2_gp_clocksource_init(void)
|
||||
+unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
- static struct omap_dm_timer *gpt;
|
||||
- u32 tick_rate;
|
||||
- static char err1[] __initdata = KERN_ERR
|
||||
- "%s: failed to request dm-timer\n";
|
||||
- static char err2[] __initdata = KERN_ERR
|
||||
- "%s: can't register clocksource!\n";
|
||||
+ u32 cyc = 0;
|
||||
|
||||
- gpt = omap_dm_timer_request();
|
||||
- if (!gpt)
|
||||
- printk(err1, clocksource_gpt.name);
|
||||
- gpt_clocksource = gpt;
|
||||
+ if (clksrc.reserved)
|
||||
+ cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
|
||||
- omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
|
||||
- tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
|
||||
+ return cyc_to_sched_clock(&cd, cyc, (u32)~0);
|
||||
+}
|
||||
+
|
||||
+/* Setup free-running counter for clocksource */
|
||||
+static void __init omap2_gp_clocksource_init(int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
+{
|
||||
+ int res;
|
||||
+
|
||||
+ res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
|
||||
+ BUG_ON(res);
|
||||
|
||||
- omap_dm_timer_set_load_start(gpt, 1, 0);
|
||||
+ pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
|
||||
+ gptimer_id, clksrc.rate);
|
||||
|
||||
- init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate);
|
||||
+ __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1);
|
||||
+ init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate);
|
||||
|
||||
- if (clocksource_register_hz(&clocksource_gpt, tick_rate))
|
||||
- printk(err2, clocksource_gpt.name);
|
||||
+ if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
|
||||
+ pr_err("Could not register clocksource %s\n",
|
||||
+ clocksource_gpt.name);
|
||||
}
|
||||
#endif
|
||||
|
||||
-#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src) \
|
||||
+#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
|
||||
+ clksrc_nr, clksrc_src) \
|
||||
static void __init omap##name##_timer_init(void) \
|
||||
{ \
|
||||
omap2_gp_clockevent_init((clkev_nr), clkev_src); \
|
||||
- omap2_gp_clocksource_init(); \
|
||||
+ omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \
|
||||
}
|
||||
|
||||
#define OMAP_SYS_TIMER(name) \
|
||||
@@ -335,14 +342,15 @@ struct sys_timer omap##name##_timer = { \
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP2
|
||||
-OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE)
|
||||
+OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE)
|
||||
OMAP_SYS_TIMER(2)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
-OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE)
|
||||
+OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE)
|
||||
OMAP_SYS_TIMER(3)
|
||||
-OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE)
|
||||
+OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
|
||||
+ 2, OMAP3_MPU_SOURCE)
|
||||
OMAP_SYS_TIMER(3_secure)
|
||||
#endif
|
||||
|
||||
@@ -354,7 +362,7 @@ static void __init omap4_timer_init(void)
|
||||
BUG_ON(!twd_base);
|
||||
#endif
|
||||
omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
|
||||
- omap2_gp_clocksource_init();
|
||||
+ omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
|
||||
}
|
||||
OMAP_SYS_TIMER(4)
|
||||
#endif
|
||||
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
|
||||
index f7fed60..c13bc3d 100644
|
||||
--- a/arch/arm/plat-omap/counter_32k.c
|
||||
+++ b/arch/arm/plat-omap/counter_32k.c
|
||||
@@ -126,7 +126,7 @@ static inline unsigned long long notrace _omap_32k_sched_clock(void)
|
||||
return cyc_to_fixed_sched_clock(&cd, cyc, (u32)~0, SC_MULT, SC_SHIFT);
|
||||
}
|
||||
|
||||
-#ifndef CONFIG_OMAP_MPU_TIMER
|
||||
+#if defined(CONFIG_OMAP_32K_TIMER) && !defined(CONFIG_OMAP_MPU_TIMER)
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
return _omap_32k_sched_clock();
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-240
@@ -1,240 +0,0 @@
|
||||
From e50befd53e52f2c72a26e33812ad896d5f8524fa Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:49 -0700
|
||||
Subject: [PATCH 015/149] omap2+: Remove omap2_gp_clockevent_set_gptimer
|
||||
|
||||
This is no longer needed as we now just set the desired
|
||||
.timer in MACHINE_START. We can now also remove timer-gp.h.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
Reviewed-by: Kevin Hilman <khilman@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-4430sdp.c | 4 ----
|
||||
arch/arm/mach-omap2/board-devkit8000.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3logic.c | 1 -
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 4 ----
|
||||
arch/arm/mach-omap2/board-omap4panda.c | 1 -
|
||||
arch/arm/mach-omap2/timer-gp.c | 26 --------------------------
|
||||
arch/arm/mach-omap2/timer-gp.h | 16 ----------------
|
||||
9 files changed, 0 insertions(+), 64 deletions(-)
|
||||
delete mode 100644 arch/arm/mach-omap2/timer-gp.h
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
index e8caced..d7df07e 100644
|
||||
--- a/arch/arm/mach-omap2/board-4430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
@@ -40,7 +40,6 @@
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "control.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
@@ -295,9 +294,6 @@ static void __init omap_4430sdp_init_early(void)
|
||||
{
|
||||
omap2_init_common_infrastructure();
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(1);
|
||||
-#endif
|
||||
}
|
||||
|
||||
static struct omap_musb_board_data musb_board_data = {
|
||||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
index 46d144d..949dbea 100644
|
||||
--- a/arch/arm/mach-omap2/board-devkit8000.c
|
||||
+++ b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
@@ -58,7 +58,6 @@
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
#define OMAP_DM9000_GPIO_IRQ 25
|
||||
@@ -441,9 +440,6 @@ static void __init devkit8000_init_early(void)
|
||||
static void __init devkit8000_init_irq(void)
|
||||
{
|
||||
omap3_init_irq();
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(12);
|
||||
-#endif
|
||||
}
|
||||
|
||||
#define OMAP_DM9000_BASE 0x2c000000
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 9ee16f6..2d8dfb3 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -50,7 +50,6 @@
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "pm.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
@@ -484,9 +483,6 @@ static void __init omap3_beagle_init_early(void)
|
||||
static void __init omap3_beagle_init_irq(void)
|
||||
{
|
||||
omap3_init_irq();
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(12);
|
||||
-#endif
|
||||
}
|
||||
|
||||
static struct platform_device *omap3_beagle_devices[] __initdata = {
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
index 469259a..703aeb5 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3logic.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3logic.c
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "control.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index 2fa8fae..b8ad4dd 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -52,7 +52,6 @@
|
||||
#include "sdram-micron-mt46h32m32lf-6.h"
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
|
||||
@@ -492,9 +491,6 @@ static void __init omap3_stalker_init_early(void)
|
||||
static void __init omap3_stalker_init_irq(void)
|
||||
{
|
||||
omap3_init_irq();
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(12);
|
||||
-#endif
|
||||
}
|
||||
|
||||
static struct platform_device *omap3_stalker_devices[] __initdata = {
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index 8c71fd2..57e6ed3 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -51,7 +51,6 @@
|
||||
|
||||
#include "mux.h"
|
||||
#include "hsmmc.h"
|
||||
-#include "timer-gp.h"
|
||||
#include "common-board-devices.h"
|
||||
|
||||
#include <asm/setup.h>
|
||||
@@ -372,9 +371,6 @@ static void __init omap3_touchbook_init_early(void)
|
||||
static void __init omap3_touchbook_init_irq(void)
|
||||
{
|
||||
omap3_init_irq();
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
- omap2_gp_clockevent_set_gptimer(12);
|
||||
-#endif
|
||||
}
|
||||
|
||||
static struct platform_device *omap3_touchbook_devices[] __initdata = {
|
||||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
index dc1d6dc..ee2034e 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap4panda.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <plat/usb.h>
|
||||
#include <plat/mmc.h>
|
||||
#include <video/omap-panel-generic-dpi.h>
|
||||
-#include "timer-gp.h"
|
||||
|
||||
#include "hsmmc.h"
|
||||
#include "control.h"
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
index 2b8cb70..ab1931c 100644
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ b/arch/arm/mach-omap2/timer-gp.c
|
||||
@@ -43,8 +43,6 @@
|
||||
#include <plat/common.h>
|
||||
#include <plat/omap_hwmod.h>
|
||||
|
||||
-#include "timer-gp.h"
|
||||
-
|
||||
/* Parent clocks, eventually these will come from the clock framework */
|
||||
|
||||
#define OMAP2_MPU_SOURCE "sys_ck"
|
||||
@@ -75,8 +73,6 @@ u32 sys_timer_reserved;
|
||||
|
||||
static struct omap_dm_timer clkev;
|
||||
static struct clock_event_device clockevent_gpt;
|
||||
-static u8 __initdata gptimer_id = 1;
|
||||
-static u8 __initdata inited;
|
||||
|
||||
static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
@@ -138,26 +134,6 @@ static struct clock_event_device clockevent_gpt = {
|
||||
.set_mode = omap2_gp_timer_set_mode,
|
||||
};
|
||||
|
||||
-/**
|
||||
- * omap2_gp_clockevent_set_gptimer - set which GPTIMER is used for clockevents
|
||||
- * @id: GPTIMER to use (1..MAX_GPTIMER_ID)
|
||||
- *
|
||||
- * Define the GPTIMER that the system should use for the tick timer.
|
||||
- * Meant to be called from board-*.c files in the event that GPTIMER1, the
|
||||
- * default, is unsuitable. Returns -EINVAL on error or 0 on success.
|
||||
- */
|
||||
-int __init omap2_gp_clockevent_set_gptimer(u8 id)
|
||||
-{
|
||||
- if (id < 1 || id > MAX_GPTIMER_ID)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- BUG_ON(inited);
|
||||
-
|
||||
- gptimer_id = id;
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
int gptimer_id,
|
||||
const char *fck_source)
|
||||
@@ -228,8 +204,6 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
{
|
||||
int res;
|
||||
|
||||
- inited = 1;
|
||||
-
|
||||
res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
|
||||
BUG_ON(res);
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h
|
||||
deleted file mode 100644
|
||||
index 5c1072c..0000000
|
||||
--- a/arch/arm/mach-omap2/timer-gp.h
|
||||
+++ /dev/null
|
||||
@@ -1,16 +0,0 @@
|
||||
-/*
|
||||
- * OMAP2/3 GPTIMER support.headers
|
||||
- *
|
||||
- * Copyright (C) 2009 Nokia Corporation
|
||||
- *
|
||||
- * This file is subject to the terms and conditions of the GNU General Public
|
||||
- * License. See the file "COPYING" in the main directory of this archive
|
||||
- * for more details.
|
||||
- */
|
||||
-
|
||||
-#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
|
||||
-#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
|
||||
-
|
||||
-extern int __init omap2_gp_clockevent_set_gptimer(u8 id);
|
||||
-
|
||||
-#endif
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-737
@@ -1,737 +0,0 @@
|
||||
From 5cdb1497ccc5b9dae8795e1e5e9c74f11e4e7401 Mon Sep 17 00:00:00 2001
|
||||
From: Tony Lindgren <tony@atomide.com>
|
||||
Date: Tue, 29 Mar 2011 15:54:50 -0700
|
||||
Subject: [PATCH 016/149] omap2+: Rename timer-gp.c into timer.c to combine timer init functions
|
||||
|
||||
We can keep everything sys_timer and gptimer.c related code in
|
||||
timer.c as the code will be very minimal.
|
||||
|
||||
Later on we can also remove timer-mpu.c, as it can be called from
|
||||
omap4_timer_init function.
|
||||
|
||||
This allows us to get rid of confusing existing files. We currently
|
||||
have timer-gp.c, timer-mpu.c, and patches have been posted to add
|
||||
dmtimer.c. There's no need to have these multiple files, we can
|
||||
put everything into timer.c.
|
||||
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 2 +-
|
||||
arch/arm/mach-omap2/timer-gp.c | 342 ----------------------------------------
|
||||
arch/arm/mach-omap2/timer.c | 342 ++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 343 insertions(+), 343 deletions(-)
|
||||
delete mode 100644 arch/arm/mach-omap2/timer-gp.c
|
||||
create mode 100644 arch/arm/mach-omap2/timer.c
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index b148077..adbe82d 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
|
||||
# Common support
|
||||
-obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \
|
||||
+obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
|
||||
common.o gpio.o dma.o wd_timer.o
|
||||
|
||||
omap-2-3-common = irq.o sdrc.o
|
||||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
|
||||
deleted file mode 100644
|
||||
index ab1931c..0000000
|
||||
--- a/arch/arm/mach-omap2/timer-gp.c
|
||||
+++ /dev/null
|
||||
@@ -1,342 +0,0 @@
|
||||
-/*
|
||||
- * linux/arch/arm/mach-omap2/timer-gp.c
|
||||
- *
|
||||
- * OMAP2 GP timer support.
|
||||
- *
|
||||
- * Copyright (C) 2009 Nokia Corporation
|
||||
- *
|
||||
- * Update to use new clocksource/clockevent layers
|
||||
- * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
|
||||
- * Copyright (C) 2007 MontaVista Software, Inc.
|
||||
- *
|
||||
- * Original driver:
|
||||
- * Copyright (C) 2005 Nokia Corporation
|
||||
- * Author: Paul Mundt <paul.mundt@nokia.com>
|
||||
- * Juha Yrjölä <juha.yrjola@nokia.com>
|
||||
- * OMAP Dual-mode timer framework support by Timo Teras
|
||||
- *
|
||||
- * Some parts based off of TI's 24xx code:
|
||||
- *
|
||||
- * Copyright (C) 2004-2009 Texas Instruments, Inc.
|
||||
- *
|
||||
- * Roughly modelled after the OMAP1 MPU timer code.
|
||||
- * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
- *
|
||||
- * This file is subject to the terms and conditions of the GNU General Public
|
||||
- * License. See the file "COPYING" in the main directory of this archive
|
||||
- * for more details.
|
||||
- */
|
||||
-#include <linux/init.h>
|
||||
-#include <linux/time.h>
|
||||
-#include <linux/interrupt.h>
|
||||
-#include <linux/err.h>
|
||||
-#include <linux/clk.h>
|
||||
-#include <linux/delay.h>
|
||||
-#include <linux/irq.h>
|
||||
-#include <linux/clocksource.h>
|
||||
-#include <linux/clockchips.h>
|
||||
-
|
||||
-#include <asm/mach/time.h>
|
||||
-#include <plat/dmtimer.h>
|
||||
-#include <asm/localtimer.h>
|
||||
-#include <asm/sched_clock.h>
|
||||
-#include <plat/common.h>
|
||||
-#include <plat/omap_hwmod.h>
|
||||
-
|
||||
-/* Parent clocks, eventually these will come from the clock framework */
|
||||
-
|
||||
-#define OMAP2_MPU_SOURCE "sys_ck"
|
||||
-#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE
|
||||
-#define OMAP4_MPU_SOURCE "sys_clkin_ck"
|
||||
-#define OMAP2_32K_SOURCE "func_32k_ck"
|
||||
-#define OMAP3_32K_SOURCE "omap_32k_fck"
|
||||
-#define OMAP4_32K_SOURCE "sys_32k_ck"
|
||||
-
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
-#define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE
|
||||
-#define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE
|
||||
-#define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE
|
||||
-#define OMAP3_SECURE_TIMER 12
|
||||
-#else
|
||||
-#define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE
|
||||
-#define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE
|
||||
-#define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE
|
||||
-#define OMAP3_SECURE_TIMER 1
|
||||
-#endif
|
||||
-
|
||||
-/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
|
||||
-#define MAX_GPTIMER_ID 12
|
||||
-
|
||||
-u32 sys_timer_reserved;
|
||||
-
|
||||
-/* Clockevent code */
|
||||
-
|
||||
-static struct omap_dm_timer clkev;
|
||||
-static struct clock_event_device clockevent_gpt;
|
||||
-
|
||||
-static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
|
||||
-{
|
||||
- struct clock_event_device *evt = &clockevent_gpt;
|
||||
-
|
||||
- __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
-
|
||||
- evt->event_handler(evt);
|
||||
- return IRQ_HANDLED;
|
||||
-}
|
||||
-
|
||||
-static struct irqaction omap2_gp_timer_irq = {
|
||||
- .name = "gp timer",
|
||||
- .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
|
||||
- .handler = omap2_gp_timer_interrupt,
|
||||
-};
|
||||
-
|
||||
-static int omap2_gp_timer_set_next_event(unsigned long cycles,
|
||||
- struct clock_event_device *evt)
|
||||
-{
|
||||
- __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST,
|
||||
- 0xffffffff - cycles, 1);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
|
||||
- struct clock_event_device *evt)
|
||||
-{
|
||||
- u32 period;
|
||||
-
|
||||
- __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate);
|
||||
-
|
||||
- switch (mode) {
|
||||
- case CLOCK_EVT_MODE_PERIODIC:
|
||||
- period = clkev.rate / HZ;
|
||||
- period -= 1;
|
||||
- /* Looks like we need to first set the load value separately */
|
||||
- __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG,
|
||||
- 0xffffffff - period, 1);
|
||||
- __omap_dm_timer_load_start(clkev.io_base,
|
||||
- OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
|
||||
- 0xffffffff - period, 1);
|
||||
- break;
|
||||
- case CLOCK_EVT_MODE_ONESHOT:
|
||||
- break;
|
||||
- case CLOCK_EVT_MODE_UNUSED:
|
||||
- case CLOCK_EVT_MODE_SHUTDOWN:
|
||||
- case CLOCK_EVT_MODE_RESUME:
|
||||
- break;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static struct clock_event_device clockevent_gpt = {
|
||||
- .name = "gp timer",
|
||||
- .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
|
||||
- .shift = 32,
|
||||
- .set_next_event = omap2_gp_timer_set_next_event,
|
||||
- .set_mode = omap2_gp_timer_set_mode,
|
||||
-};
|
||||
-
|
||||
-static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
- int gptimer_id,
|
||||
- const char *fck_source)
|
||||
-{
|
||||
- char name[10]; /* 10 = sizeof("gptXX_Xck0") */
|
||||
- struct omap_hwmod *oh;
|
||||
- size_t size;
|
||||
- int res = 0;
|
||||
-
|
||||
- sprintf(name, "timer%d", gptimer_id);
|
||||
- omap_hwmod_setup_one(name);
|
||||
- oh = omap_hwmod_lookup(name);
|
||||
- if (!oh)
|
||||
- return -ENODEV;
|
||||
-
|
||||
- timer->irq = oh->mpu_irqs[0].irq;
|
||||
- timer->phys_base = oh->slaves[0]->addr->pa_start;
|
||||
- size = oh->slaves[0]->addr->pa_end - timer->phys_base;
|
||||
-
|
||||
- /* Static mapping, never released */
|
||||
- timer->io_base = ioremap(timer->phys_base, size);
|
||||
- if (!timer->io_base)
|
||||
- return -ENXIO;
|
||||
-
|
||||
- /* After the dmtimer is using hwmod these clocks won't be needed */
|
||||
- sprintf(name, "gpt%d_fck", gptimer_id);
|
||||
- timer->fclk = clk_get(NULL, name);
|
||||
- if (IS_ERR(timer->fclk))
|
||||
- return -ENODEV;
|
||||
-
|
||||
- sprintf(name, "gpt%d_ick", gptimer_id);
|
||||
- timer->iclk = clk_get(NULL, name);
|
||||
- if (IS_ERR(timer->iclk)) {
|
||||
- clk_put(timer->fclk);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
- omap_hwmod_enable(oh);
|
||||
-
|
||||
- sys_timer_reserved |= (1 << (gptimer_id - 1));
|
||||
-
|
||||
- if (gptimer_id != 12) {
|
||||
- struct clk *src;
|
||||
-
|
||||
- src = clk_get(NULL, fck_source);
|
||||
- if (IS_ERR(src)) {
|
||||
- res = -EINVAL;
|
||||
- } else {
|
||||
- res = __omap_dm_timer_set_source(timer->fclk, src);
|
||||
- if (IS_ERR_VALUE(res))
|
||||
- pr_warning("%s: timer%i cannot set source\n",
|
||||
- __func__, gptimer_id);
|
||||
- clk_put(src);
|
||||
- }
|
||||
- }
|
||||
- __omap_dm_timer_reset(timer->io_base, 1, 1);
|
||||
- timer->posted = 1;
|
||||
-
|
||||
- timer->rate = clk_get_rate(timer->fclk);
|
||||
-
|
||||
- timer->reserved = 1;
|
||||
-
|
||||
- return res;
|
||||
-}
|
||||
-
|
||||
-static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
- const char *fck_source)
|
||||
-{
|
||||
- int res;
|
||||
-
|
||||
- res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
|
||||
- BUG_ON(res);
|
||||
-
|
||||
- omap2_gp_timer_irq.dev_id = (void *)&clkev;
|
||||
- setup_irq(clkev.irq, &omap2_gp_timer_irq);
|
||||
-
|
||||
- __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
-
|
||||
- clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
|
||||
- clockevent_gpt.shift);
|
||||
- clockevent_gpt.max_delta_ns =
|
||||
- clockevent_delta2ns(0xffffffff, &clockevent_gpt);
|
||||
- clockevent_gpt.min_delta_ns =
|
||||
- clockevent_delta2ns(3, &clockevent_gpt);
|
||||
- /* Timer internal resynch latency. */
|
||||
-
|
||||
- clockevent_gpt.cpumask = cpumask_of(0);
|
||||
- clockevents_register_device(&clockevent_gpt);
|
||||
-
|
||||
- pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
|
||||
- gptimer_id, clkev.rate);
|
||||
-}
|
||||
-
|
||||
-/* Clocksource code */
|
||||
-
|
||||
-#ifdef CONFIG_OMAP_32K_TIMER
|
||||
-/*
|
||||
- * When 32k-timer is enabled, don't use GPTimer for clocksource
|
||||
- * instead, just leave default clocksource which uses the 32k
|
||||
- * sync counter. See clocksource setup in plat-omap/counter_32k.c
|
||||
- */
|
||||
-
|
||||
-static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
|
||||
-{
|
||||
- omap_init_clocksource_32k();
|
||||
-}
|
||||
-
|
||||
-#else
|
||||
-
|
||||
-static struct omap_dm_timer clksrc;
|
||||
-
|
||||
-/*
|
||||
- * clocksource
|
||||
- */
|
||||
-static DEFINE_CLOCK_DATA(cd);
|
||||
-static cycle_t clocksource_read_cycles(struct clocksource *cs)
|
||||
-{
|
||||
- return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
-}
|
||||
-
|
||||
-static struct clocksource clocksource_gpt = {
|
||||
- .name = "gp timer",
|
||||
- .rating = 300,
|
||||
- .read = clocksource_read_cycles,
|
||||
- .mask = CLOCKSOURCE_MASK(32),
|
||||
- .flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
-};
|
||||
-
|
||||
-static void notrace dmtimer_update_sched_clock(void)
|
||||
-{
|
||||
- u32 cyc;
|
||||
-
|
||||
- cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
-
|
||||
- update_sched_clock(&cd, cyc, (u32)~0);
|
||||
-}
|
||||
-
|
||||
-unsigned long long notrace sched_clock(void)
|
||||
-{
|
||||
- u32 cyc = 0;
|
||||
-
|
||||
- if (clksrc.reserved)
|
||||
- cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
-
|
||||
- return cyc_to_sched_clock(&cd, cyc, (u32)~0);
|
||||
-}
|
||||
-
|
||||
-/* Setup free-running counter for clocksource */
|
||||
-static void __init omap2_gp_clocksource_init(int gptimer_id,
|
||||
- const char *fck_source)
|
||||
-{
|
||||
- int res;
|
||||
-
|
||||
- res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
|
||||
- BUG_ON(res);
|
||||
-
|
||||
- pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
|
||||
- gptimer_id, clksrc.rate);
|
||||
-
|
||||
- __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1);
|
||||
- init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate);
|
||||
-
|
||||
- if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
|
||||
- pr_err("Could not register clocksource %s\n",
|
||||
- clocksource_gpt.name);
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
-#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
|
||||
- clksrc_nr, clksrc_src) \
|
||||
-static void __init omap##name##_timer_init(void) \
|
||||
-{ \
|
||||
- omap2_gp_clockevent_init((clkev_nr), clkev_src); \
|
||||
- omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \
|
||||
-}
|
||||
-
|
||||
-#define OMAP_SYS_TIMER(name) \
|
||||
-struct sys_timer omap##name##_timer = { \
|
||||
- .init = omap##name##_timer_init, \
|
||||
-};
|
||||
-
|
||||
-#ifdef CONFIG_ARCH_OMAP2
|
||||
-OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE)
|
||||
-OMAP_SYS_TIMER(2)
|
||||
-#endif
|
||||
-
|
||||
-#ifdef CONFIG_ARCH_OMAP3
|
||||
-OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE)
|
||||
-OMAP_SYS_TIMER(3)
|
||||
-OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
|
||||
- 2, OMAP3_MPU_SOURCE)
|
||||
-OMAP_SYS_TIMER(3_secure)
|
||||
-#endif
|
||||
-
|
||||
-#ifdef CONFIG_ARCH_OMAP4
|
||||
-static void __init omap4_timer_init(void)
|
||||
-{
|
||||
-#ifdef CONFIG_LOCAL_TIMERS
|
||||
- twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
|
||||
- BUG_ON(!twd_base);
|
||||
-#endif
|
||||
- omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
|
||||
- omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
|
||||
-}
|
||||
-OMAP_SYS_TIMER(4)
|
||||
-#endif
|
||||
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
|
||||
new file mode 100644
|
||||
index 0000000..e964072
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/timer.c
|
||||
@@ -0,0 +1,342 @@
|
||||
+/*
|
||||
+ * linux/arch/arm/mach-omap2/timer.c
|
||||
+ *
|
||||
+ * OMAP2 GP timer support.
|
||||
+ *
|
||||
+ * Copyright (C) 2009 Nokia Corporation
|
||||
+ *
|
||||
+ * Update to use new clocksource/clockevent layers
|
||||
+ * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
|
||||
+ * Copyright (C) 2007 MontaVista Software, Inc.
|
||||
+ *
|
||||
+ * Original driver:
|
||||
+ * Copyright (C) 2005 Nokia Corporation
|
||||
+ * Author: Paul Mundt <paul.mundt@nokia.com>
|
||||
+ * Juha Yrjölä <juha.yrjola@nokia.com>
|
||||
+ * OMAP Dual-mode timer framework support by Timo Teras
|
||||
+ *
|
||||
+ * Some parts based off of TI's 24xx code:
|
||||
+ *
|
||||
+ * Copyright (C) 2004-2009 Texas Instruments, Inc.
|
||||
+ *
|
||||
+ * Roughly modelled after the OMAP1 MPU timer code.
|
||||
+ * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
|
||||
+ *
|
||||
+ * This file is subject to the terms and conditions of the GNU General Public
|
||||
+ * License. See the file "COPYING" in the main directory of this archive
|
||||
+ * for more details.
|
||||
+ */
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/time.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/clk.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <linux/clocksource.h>
|
||||
+#include <linux/clockchips.h>
|
||||
+
|
||||
+#include <asm/mach/time.h>
|
||||
+#include <plat/dmtimer.h>
|
||||
+#include <asm/localtimer.h>
|
||||
+#include <asm/sched_clock.h>
|
||||
+#include <plat/common.h>
|
||||
+#include <plat/omap_hwmod.h>
|
||||
+
|
||||
+/* Parent clocks, eventually these will come from the clock framework */
|
||||
+
|
||||
+#define OMAP2_MPU_SOURCE "sys_ck"
|
||||
+#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE
|
||||
+#define OMAP4_MPU_SOURCE "sys_clkin_ck"
|
||||
+#define OMAP2_32K_SOURCE "func_32k_ck"
|
||||
+#define OMAP3_32K_SOURCE "omap_32k_fck"
|
||||
+#define OMAP4_32K_SOURCE "sys_32k_ck"
|
||||
+
|
||||
+#ifdef CONFIG_OMAP_32K_TIMER
|
||||
+#define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE
|
||||
+#define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE
|
||||
+#define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE
|
||||
+#define OMAP3_SECURE_TIMER 12
|
||||
+#else
|
||||
+#define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE
|
||||
+#define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE
|
||||
+#define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE
|
||||
+#define OMAP3_SECURE_TIMER 1
|
||||
+#endif
|
||||
+
|
||||
+/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
|
||||
+#define MAX_GPTIMER_ID 12
|
||||
+
|
||||
+u32 sys_timer_reserved;
|
||||
+
|
||||
+/* Clockevent code */
|
||||
+
|
||||
+static struct omap_dm_timer clkev;
|
||||
+static struct clock_event_device clockevent_gpt;
|
||||
+
|
||||
+static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct clock_event_device *evt = &clockevent_gpt;
|
||||
+
|
||||
+ __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
+
|
||||
+ evt->event_handler(evt);
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static struct irqaction omap2_gp_timer_irq = {
|
||||
+ .name = "gp timer",
|
||||
+ .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
|
||||
+ .handler = omap2_gp_timer_interrupt,
|
||||
+};
|
||||
+
|
||||
+static int omap2_gp_timer_set_next_event(unsigned long cycles,
|
||||
+ struct clock_event_device *evt)
|
||||
+{
|
||||
+ __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST,
|
||||
+ 0xffffffff - cycles, 1);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
|
||||
+ struct clock_event_device *evt)
|
||||
+{
|
||||
+ u32 period;
|
||||
+
|
||||
+ __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate);
|
||||
+
|
||||
+ switch (mode) {
|
||||
+ case CLOCK_EVT_MODE_PERIODIC:
|
||||
+ period = clkev.rate / HZ;
|
||||
+ period -= 1;
|
||||
+ /* Looks like we need to first set the load value separately */
|
||||
+ __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG,
|
||||
+ 0xffffffff - period, 1);
|
||||
+ __omap_dm_timer_load_start(clkev.io_base,
|
||||
+ OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
|
||||
+ 0xffffffff - period, 1);
|
||||
+ break;
|
||||
+ case CLOCK_EVT_MODE_ONESHOT:
|
||||
+ break;
|
||||
+ case CLOCK_EVT_MODE_UNUSED:
|
||||
+ case CLOCK_EVT_MODE_SHUTDOWN:
|
||||
+ case CLOCK_EVT_MODE_RESUME:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static struct clock_event_device clockevent_gpt = {
|
||||
+ .name = "gp timer",
|
||||
+ .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
|
||||
+ .shift = 32,
|
||||
+ .set_next_event = omap2_gp_timer_set_next_event,
|
||||
+ .set_mode = omap2_gp_timer_set_mode,
|
||||
+};
|
||||
+
|
||||
+static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
|
||||
+ int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
+{
|
||||
+ char name[10]; /* 10 = sizeof("gptXX_Xck0") */
|
||||
+ struct omap_hwmod *oh;
|
||||
+ size_t size;
|
||||
+ int res = 0;
|
||||
+
|
||||
+ sprintf(name, "timer%d", gptimer_id);
|
||||
+ omap_hwmod_setup_one(name);
|
||||
+ oh = omap_hwmod_lookup(name);
|
||||
+ if (!oh)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ timer->irq = oh->mpu_irqs[0].irq;
|
||||
+ timer->phys_base = oh->slaves[0]->addr->pa_start;
|
||||
+ size = oh->slaves[0]->addr->pa_end - timer->phys_base;
|
||||
+
|
||||
+ /* Static mapping, never released */
|
||||
+ timer->io_base = ioremap(timer->phys_base, size);
|
||||
+ if (!timer->io_base)
|
||||
+ return -ENXIO;
|
||||
+
|
||||
+ /* After the dmtimer is using hwmod these clocks won't be needed */
|
||||
+ sprintf(name, "gpt%d_fck", gptimer_id);
|
||||
+ timer->fclk = clk_get(NULL, name);
|
||||
+ if (IS_ERR(timer->fclk))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ sprintf(name, "gpt%d_ick", gptimer_id);
|
||||
+ timer->iclk = clk_get(NULL, name);
|
||||
+ if (IS_ERR(timer->iclk)) {
|
||||
+ clk_put(timer->fclk);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ omap_hwmod_enable(oh);
|
||||
+
|
||||
+ sys_timer_reserved |= (1 << (gptimer_id - 1));
|
||||
+
|
||||
+ if (gptimer_id != 12) {
|
||||
+ struct clk *src;
|
||||
+
|
||||
+ src = clk_get(NULL, fck_source);
|
||||
+ if (IS_ERR(src)) {
|
||||
+ res = -EINVAL;
|
||||
+ } else {
|
||||
+ res = __omap_dm_timer_set_source(timer->fclk, src);
|
||||
+ if (IS_ERR_VALUE(res))
|
||||
+ pr_warning("%s: timer%i cannot set source\n",
|
||||
+ __func__, gptimer_id);
|
||||
+ clk_put(src);
|
||||
+ }
|
||||
+ }
|
||||
+ __omap_dm_timer_reset(timer->io_base, 1, 1);
|
||||
+ timer->posted = 1;
|
||||
+
|
||||
+ timer->rate = clk_get_rate(timer->fclk);
|
||||
+
|
||||
+ timer->reserved = 1;
|
||||
+
|
||||
+ return res;
|
||||
+}
|
||||
+
|
||||
+static void __init omap2_gp_clockevent_init(int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
+{
|
||||
+ int res;
|
||||
+
|
||||
+ res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
|
||||
+ BUG_ON(res);
|
||||
+
|
||||
+ omap2_gp_timer_irq.dev_id = (void *)&clkev;
|
||||
+ setup_irq(clkev.irq, &omap2_gp_timer_irq);
|
||||
+
|
||||
+ __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
|
||||
+
|
||||
+ clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
|
||||
+ clockevent_gpt.shift);
|
||||
+ clockevent_gpt.max_delta_ns =
|
||||
+ clockevent_delta2ns(0xffffffff, &clockevent_gpt);
|
||||
+ clockevent_gpt.min_delta_ns =
|
||||
+ clockevent_delta2ns(3, &clockevent_gpt);
|
||||
+ /* Timer internal resynch latency. */
|
||||
+
|
||||
+ clockevent_gpt.cpumask = cpumask_of(0);
|
||||
+ clockevents_register_device(&clockevent_gpt);
|
||||
+
|
||||
+ pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
|
||||
+ gptimer_id, clkev.rate);
|
||||
+}
|
||||
+
|
||||
+/* Clocksource code */
|
||||
+
|
||||
+#ifdef CONFIG_OMAP_32K_TIMER
|
||||
+/*
|
||||
+ * When 32k-timer is enabled, don't use GPTimer for clocksource
|
||||
+ * instead, just leave default clocksource which uses the 32k
|
||||
+ * sync counter. See clocksource setup in plat-omap/counter_32k.c
|
||||
+ */
|
||||
+
|
||||
+static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
|
||||
+{
|
||||
+ omap_init_clocksource_32k();
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+static struct omap_dm_timer clksrc;
|
||||
+
|
||||
+/*
|
||||
+ * clocksource
|
||||
+ */
|
||||
+static DEFINE_CLOCK_DATA(cd);
|
||||
+static cycle_t clocksource_read_cycles(struct clocksource *cs)
|
||||
+{
|
||||
+ return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
+}
|
||||
+
|
||||
+static struct clocksource clocksource_gpt = {
|
||||
+ .name = "gp timer",
|
||||
+ .rating = 300,
|
||||
+ .read = clocksource_read_cycles,
|
||||
+ .mask = CLOCKSOURCE_MASK(32),
|
||||
+ .flags = CLOCK_SOURCE_IS_CONTINUOUS,
|
||||
+};
|
||||
+
|
||||
+static void notrace dmtimer_update_sched_clock(void)
|
||||
+{
|
||||
+ u32 cyc;
|
||||
+
|
||||
+ cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
+
|
||||
+ update_sched_clock(&cd, cyc, (u32)~0);
|
||||
+}
|
||||
+
|
||||
+unsigned long long notrace sched_clock(void)
|
||||
+{
|
||||
+ u32 cyc = 0;
|
||||
+
|
||||
+ if (clksrc.reserved)
|
||||
+ cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
|
||||
+
|
||||
+ return cyc_to_sched_clock(&cd, cyc, (u32)~0);
|
||||
+}
|
||||
+
|
||||
+/* Setup free-running counter for clocksource */
|
||||
+static void __init omap2_gp_clocksource_init(int gptimer_id,
|
||||
+ const char *fck_source)
|
||||
+{
|
||||
+ int res;
|
||||
+
|
||||
+ res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
|
||||
+ BUG_ON(res);
|
||||
+
|
||||
+ pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
|
||||
+ gptimer_id, clksrc.rate);
|
||||
+
|
||||
+ __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1);
|
||||
+ init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate);
|
||||
+
|
||||
+ if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
|
||||
+ pr_err("Could not register clocksource %s\n",
|
||||
+ clocksource_gpt.name);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
|
||||
+ clksrc_nr, clksrc_src) \
|
||||
+static void __init omap##name##_timer_init(void) \
|
||||
+{ \
|
||||
+ omap2_gp_clockevent_init((clkev_nr), clkev_src); \
|
||||
+ omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \
|
||||
+}
|
||||
+
|
||||
+#define OMAP_SYS_TIMER(name) \
|
||||
+struct sys_timer omap##name##_timer = { \
|
||||
+ .init = omap##name##_timer_init, \
|
||||
+};
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP2
|
||||
+OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE)
|
||||
+OMAP_SYS_TIMER(2)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP3
|
||||
+OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE)
|
||||
+OMAP_SYS_TIMER(3)
|
||||
+OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
|
||||
+ 2, OMAP3_MPU_SOURCE)
|
||||
+OMAP_SYS_TIMER(3_secure)
|
||||
+#endif
|
||||
+
|
||||
+#ifdef CONFIG_ARCH_OMAP4
|
||||
+static void __init omap4_timer_init(void)
|
||||
+{
|
||||
+#ifdef CONFIG_LOCAL_TIMERS
|
||||
+ twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
|
||||
+ BUG_ON(!twd_base);
|
||||
+#endif
|
||||
+ omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
|
||||
+ omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
|
||||
+}
|
||||
+OMAP_SYS_TIMER(4)
|
||||
+#endif
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-165
@@ -1,165 +0,0 @@
|
||||
From a72eaf768c2f553f72e7afc0b1c52661b2913022 Mon Sep 17 00:00:00 2001
|
||||
From: Grazvydas Ignotas <notasas@gmail.com>
|
||||
Date: Fri, 3 Jun 2011 19:56:33 +0000
|
||||
Subject: [PATCH 017/149] omap: cleanup NAND platform data
|
||||
|
||||
omap_nand_platform_data fields 'options', 'gpio_irq', 'nand_setup' and
|
||||
'dma_channel' are never referenced by the NAND driver, yet various
|
||||
board files are initializing those fields. This is both incorrect and
|
||||
confusing, so remove them. This allows to get rid of a global
|
||||
variable in gpmc-nand.c.
|
||||
|
||||
This also corrects an issue where some boards are trying to pass NAND
|
||||
16bit flag through .options, but the driver is using .devsize instead
|
||||
and ignoring .options.
|
||||
|
||||
Finally, .dev_ready is treated as a flag by the driver, so make it bool
|
||||
instead of a function pointer.
|
||||
|
||||
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 2 --
|
||||
arch/arm/mach-omap2/board-cm-t3517.c | 1 -
|
||||
arch/arm/mach-omap2/board-flash.c | 4 ----
|
||||
arch/arm/mach-omap2/common-board-devices.c | 6 ++----
|
||||
arch/arm/mach-omap2/gpmc-nand.c | 10 +++-------
|
||||
arch/arm/plat-omap/include/plat/nand.h | 6 +-----
|
||||
6 files changed, 6 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index 1a18d3b..d76dca7 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
|
||||
static struct omap_nand_platform_data cm_t35_nand_data = {
|
||||
.parts = cm_t35_nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(cm_t35_nand_partitions),
|
||||
- .dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
.cs = 0,
|
||||
-
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_nand(void)
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
index aa67240..05c72f4 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
|
||||
@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
|
||||
static struct omap_nand_platform_data cm_t3517_nand_data = {
|
||||
.parts = cm_t3517_nand_partitions,
|
||||
.nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions),
|
||||
- .dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
.cs = 0,
|
||||
};
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
|
||||
index 729892f..aa1b0cb 100644
|
||||
--- a/arch/arm/mach-omap2/board-flash.c
|
||||
+++ b/arch/arm/mach-omap2/board-flash.c
|
||||
@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = {
|
||||
};
|
||||
|
||||
static struct omap_nand_platform_data board_nand_data = {
|
||||
- .nand_setup = NULL,
|
||||
.gpmc_t = &nand_timings,
|
||||
- .dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
- .dev_ready = NULL,
|
||||
- .devsize = 0, /* '0' for 8-bit, '1' for 16-bit device */
|
||||
};
|
||||
|
||||
void
|
||||
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
|
||||
index 94ccf46..0043fa8 100644
|
||||
--- a/arch/arm/mach-omap2/common-board-devices.c
|
||||
+++ b/arch/arm/mach-omap2/common-board-devices.c
|
||||
@@ -115,9 +115,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
|
||||
-static struct omap_nand_platform_data nand_data = {
|
||||
- .dma_channel = -1, /* disable DMA in OMAP NAND driver */
|
||||
-};
|
||||
+static struct omap_nand_platform_data nand_data;
|
||||
|
||||
void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
|
||||
int nr_parts)
|
||||
@@ -148,7 +146,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
|
||||
nand_data.cs = nandcs;
|
||||
nand_data.parts = parts;
|
||||
nand_data.nr_parts = nr_parts;
|
||||
- nand_data.options = options;
|
||||
+ nand_data.devsize = options;
|
||||
|
||||
printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
|
||||
if (gpmc_nand_init(&nand_data) < 0)
|
||||
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
|
||||
index c1791d0..8ad210b 100644
|
||||
--- a/arch/arm/mach-omap2/gpmc-nand.c
|
||||
+++ b/arch/arm/mach-omap2/gpmc-nand.c
|
||||
@@ -20,8 +20,6 @@
|
||||
#include <plat/board.h>
|
||||
#include <plat/gpmc.h>
|
||||
|
||||
-static struct omap_nand_platform_data *gpmc_nand_data;
|
||||
-
|
||||
static struct resource gpmc_nand_resource = {
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
@@ -33,7 +31,7 @@ static struct platform_device gpmc_nand_device = {
|
||||
.resource = &gpmc_nand_resource,
|
||||
};
|
||||
|
||||
-static int omap2_nand_gpmc_retime(void)
|
||||
+static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
|
||||
{
|
||||
struct gpmc_timings t;
|
||||
int err;
|
||||
@@ -83,13 +81,11 @@ static int omap2_nand_gpmc_retime(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
|
||||
+int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
|
||||
{
|
||||
int err = 0;
|
||||
struct device *dev = &gpmc_nand_device.dev;
|
||||
|
||||
- gpmc_nand_data = _nand_data;
|
||||
- gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime;
|
||||
gpmc_nand_device.dev.platform_data = gpmc_nand_data;
|
||||
|
||||
err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
|
||||
@@ -100,7 +96,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
|
||||
}
|
||||
|
||||
/* Set timings in GPMC */
|
||||
- err = omap2_nand_gpmc_retime();
|
||||
+ err = omap2_nand_gpmc_retime(gpmc_nand_data);
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Unable to set gpmc timings: %d\n", err);
|
||||
return err;
|
||||
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
|
||||
index d86d1ec..67fc506 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/nand.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/nand.h
|
||||
@@ -19,15 +19,11 @@ enum nand_io {
|
||||
};
|
||||
|
||||
struct omap_nand_platform_data {
|
||||
- unsigned int options;
|
||||
int cs;
|
||||
- int gpio_irq;
|
||||
struct mtd_partition *parts;
|
||||
struct gpmc_timings *gpmc_t;
|
||||
int nr_parts;
|
||||
- int (*nand_setup)(void);
|
||||
- int (*dev_ready)(struct omap_nand_platform_data *);
|
||||
- int dma_channel;
|
||||
+ bool dev_ready;
|
||||
int gpmc_irq;
|
||||
enum nand_io xfer_type;
|
||||
unsigned long phys_base;
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
From 3e0e5636effabe150374f2a212974f1e954be5b2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Tue, 28 Jun 2011 10:16:55 +0000
|
||||
Subject: [PATCH 018/149] omap: board-omap3evm: Fix compilation error
|
||||
|
||||
Fix compilation error introduced with 786b01a8c1db0c0decca55d660a2a3ebd7cfb26b
|
||||
(cleanup regulator supply definitions in mach-omap2).
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
[tony@atomide.com: updated comments]
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index 6f957ed..57bce0f 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -510,7 +510,7 @@ static struct regulator_init_data omap3evm_vio = {
|
||||
#define OMAP3EVM_WLAN_IRQ_GPIO (149)
|
||||
|
||||
static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = {
|
||||
- REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
|
||||
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
};
|
||||
|
||||
/* VMMC2 for driving the WL12xx module */
|
||||
@@ -518,7 +518,7 @@ static struct regulator_init_data omap3evm_vmmc2 = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply);,
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply),
|
||||
.consumer_supplies = omap3evm_vmmc2_supply,
|
||||
};
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-311
@@ -1,311 +0,0 @@
|
||||
From 20f244f6b795ee54f053eee5a5e0f9313a13e403 Mon Sep 17 00:00:00 2001
|
||||
From: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Date: Tue, 14 Jun 2011 11:23:51 +0000
|
||||
Subject: [PATCH 019/149] omap: mcbsp: Drop SPI mode support
|
||||
|
||||
We haven't seen any use for the SPI API in McBSP driver over the years. More
|
||||
over, Peter Ujfalusi <peter.ujfalusi@ti.com> noticed that SPI mode is not
|
||||
even supported since OMAP2430 so it's very unlikely that we'll see any use
|
||||
for it in the future either.
|
||||
|
||||
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/plat-omap/include/plat/mcbsp.h | 37 ------
|
||||
arch/arm/plat-omap/mcbsp.c | 214 -------------------------------
|
||||
2 files changed, 0 insertions(+), 251 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
index f8f690a..3fc75a8 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
@@ -353,38 +353,6 @@ typedef enum {
|
||||
OMAP_MCBSP_WORD_32,
|
||||
} omap_mcbsp_word_length;
|
||||
|
||||
-typedef enum {
|
||||
- OMAP_MCBSP_CLK_RISING = 0,
|
||||
- OMAP_MCBSP_CLK_FALLING,
|
||||
-} omap_mcbsp_clk_polarity;
|
||||
-
|
||||
-typedef enum {
|
||||
- OMAP_MCBSP_FS_ACTIVE_HIGH = 0,
|
||||
- OMAP_MCBSP_FS_ACTIVE_LOW,
|
||||
-} omap_mcbsp_fs_polarity;
|
||||
-
|
||||
-typedef enum {
|
||||
- OMAP_MCBSP_CLK_STP_MODE_NO_DELAY = 0,
|
||||
- OMAP_MCBSP_CLK_STP_MODE_DELAY,
|
||||
-} omap_mcbsp_clk_stp_mode;
|
||||
-
|
||||
-
|
||||
-/******* SPI specific mode **********/
|
||||
-typedef enum {
|
||||
- OMAP_MCBSP_SPI_MASTER = 0,
|
||||
- OMAP_MCBSP_SPI_SLAVE,
|
||||
-} omap_mcbsp_spi_mode;
|
||||
-
|
||||
-struct omap_mcbsp_spi_cfg {
|
||||
- omap_mcbsp_spi_mode spi_mode;
|
||||
- omap_mcbsp_clk_polarity rx_clock_polarity;
|
||||
- omap_mcbsp_clk_polarity tx_clock_polarity;
|
||||
- omap_mcbsp_fs_polarity fsx_polarity;
|
||||
- u8 clk_div;
|
||||
- omap_mcbsp_clk_stp_mode clk_stp_mode;
|
||||
- omap_mcbsp_word_length word_length;
|
||||
-};
|
||||
-
|
||||
/* Platform specific configuration */
|
||||
struct omap_mcbsp_ops {
|
||||
void (*request)(unsigned int);
|
||||
@@ -504,14 +472,9 @@ u32 omap_mcbsp_recv_word(unsigned int id);
|
||||
|
||||
int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
|
||||
int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
|
||||
-int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word);
|
||||
-int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 * word);
|
||||
-
|
||||
|
||||
/* McBSP functional clock source changing function */
|
||||
extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id);
|
||||
-/* SPI specific API */
|
||||
-void omap_mcbsp_set_spi_mode(unsigned int id, const struct omap_mcbsp_spi_cfg * spi_cfg);
|
||||
|
||||
/* Polled read/write functions */
|
||||
int omap_mcbsp_pollread(unsigned int id, u16 * buf);
|
||||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
|
||||
index 5587acf..1de2724 100644
|
||||
--- a/arch/arm/plat-omap/mcbsp.c
|
||||
+++ b/arch/arm/plat-omap/mcbsp.c
|
||||
@@ -1175,147 +1175,6 @@ u32 omap_mcbsp_recv_word(unsigned int id)
|
||||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_recv_word);
|
||||
|
||||
-int omap_mcbsp_spi_master_xmit_word_poll(unsigned int id, u32 word)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- omap_mcbsp_word_length tx_word_length;
|
||||
- omap_mcbsp_word_length rx_word_length;
|
||||
- u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
- tx_word_length = mcbsp->tx_word_length;
|
||||
- rx_word_length = mcbsp->rx_word_length;
|
||||
-
|
||||
- if (tx_word_length != rx_word_length)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- /* First we wait for the transmitter to be ready */
|
||||
- spcr2 = MCBSP_READ(mcbsp, SPCR2);
|
||||
- while (!(spcr2 & XRDY)) {
|
||||
- spcr2 = MCBSP_READ(mcbsp, SPCR2);
|
||||
- if (attempts++ > 1000) {
|
||||
- /* We must reset the transmitter */
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST);
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "McBSP%d transmitter not "
|
||||
- "ready\n", mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Now we can push the data */
|
||||
- if (tx_word_length > OMAP_MCBSP_WORD_16)
|
||||
- MCBSP_WRITE(mcbsp, DXR2, word >> 16);
|
||||
- MCBSP_WRITE(mcbsp, DXR1, word & 0xffff);
|
||||
-
|
||||
- /* We wait for the receiver to be ready */
|
||||
- spcr1 = MCBSP_READ(mcbsp, SPCR1);
|
||||
- while (!(spcr1 & RRDY)) {
|
||||
- spcr1 = MCBSP_READ(mcbsp, SPCR1);
|
||||
- if (attempts++ > 1000) {
|
||||
- /* We must reset the receiver */
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST);
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "McBSP%d receiver not "
|
||||
- "ready\n", mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Receiver is ready, let's read the dummy data */
|
||||
- if (rx_word_length > OMAP_MCBSP_WORD_16)
|
||||
- word_msb = MCBSP_READ(mcbsp, DRR2);
|
||||
- word_lsb = MCBSP_READ(mcbsp, DRR1);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_spi_master_xmit_word_poll);
|
||||
-
|
||||
-int omap_mcbsp_spi_master_recv_word_poll(unsigned int id, u32 *word)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- u32 clock_word = 0;
|
||||
- omap_mcbsp_word_length tx_word_length;
|
||||
- omap_mcbsp_word_length rx_word_length;
|
||||
- u16 spcr2, spcr1, attempts = 0, word_lsb, word_msb = 0;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- tx_word_length = mcbsp->tx_word_length;
|
||||
- rx_word_length = mcbsp->rx_word_length;
|
||||
-
|
||||
- if (tx_word_length != rx_word_length)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- /* First we wait for the transmitter to be ready */
|
||||
- spcr2 = MCBSP_READ(mcbsp, SPCR2);
|
||||
- while (!(spcr2 & XRDY)) {
|
||||
- spcr2 = MCBSP_READ(mcbsp, SPCR2);
|
||||
- if (attempts++ > 1000) {
|
||||
- /* We must reset the transmitter */
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) & (~XRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) | XRST);
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "McBSP%d transmitter not "
|
||||
- "ready\n", mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* We first need to enable the bus clock */
|
||||
- if (tx_word_length > OMAP_MCBSP_WORD_16)
|
||||
- MCBSP_WRITE(mcbsp, DXR2, clock_word >> 16);
|
||||
- MCBSP_WRITE(mcbsp, DXR1, clock_word & 0xffff);
|
||||
-
|
||||
- /* We wait for the receiver to be ready */
|
||||
- spcr1 = MCBSP_READ(mcbsp, SPCR1);
|
||||
- while (!(spcr1 & RRDY)) {
|
||||
- spcr1 = MCBSP_READ(mcbsp, SPCR1);
|
||||
- if (attempts++ > 1000) {
|
||||
- /* We must reset the receiver */
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) & (~RRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) | RRST);
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "McBSP%d receiver not "
|
||||
- "ready\n", mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /* Receiver is ready, there is something for us */
|
||||
- if (rx_word_length > OMAP_MCBSP_WORD_16)
|
||||
- word_msb = MCBSP_READ(mcbsp, DRR2);
|
||||
- word_lsb = MCBSP_READ(mcbsp, DRR1);
|
||||
-
|
||||
- word[0] = (word_lsb | (word_msb << 16));
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_spi_master_recv_word_poll);
|
||||
-
|
||||
/*
|
||||
* Simple DMA based buffer rx/tx routines.
|
||||
* Nothing fancy, just a single buffer tx/rx through DMA.
|
||||
@@ -1449,79 +1308,6 @@ int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer,
|
||||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_recv_buffer);
|
||||
|
||||
-/*
|
||||
- * SPI wrapper.
|
||||
- * Since SPI setup is much simpler than the generic McBSP one,
|
||||
- * this wrapper just need an omap_mcbsp_spi_cfg structure as an input.
|
||||
- * Once this is done, you can call omap_mcbsp_start().
|
||||
- */
|
||||
-void omap_mcbsp_set_spi_mode(unsigned int id,
|
||||
- const struct omap_mcbsp_spi_cfg *spi_cfg)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- struct omap_mcbsp_reg_cfg mcbsp_cfg;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- memset(&mcbsp_cfg, 0, sizeof(struct omap_mcbsp_reg_cfg));
|
||||
-
|
||||
- /* SPI has only one frame */
|
||||
- mcbsp_cfg.rcr1 |= (RWDLEN1(spi_cfg->word_length) | RFRLEN1(0));
|
||||
- mcbsp_cfg.xcr1 |= (XWDLEN1(spi_cfg->word_length) | XFRLEN1(0));
|
||||
-
|
||||
- /* Clock stop mode */
|
||||
- if (spi_cfg->clk_stp_mode == OMAP_MCBSP_CLK_STP_MODE_NO_DELAY)
|
||||
- mcbsp_cfg.spcr1 |= (1 << 12);
|
||||
- else
|
||||
- mcbsp_cfg.spcr1 |= (3 << 11);
|
||||
-
|
||||
- /* Set clock parities */
|
||||
- if (spi_cfg->rx_clock_polarity == OMAP_MCBSP_CLK_RISING)
|
||||
- mcbsp_cfg.pcr0 |= CLKRP;
|
||||
- else
|
||||
- mcbsp_cfg.pcr0 &= ~CLKRP;
|
||||
-
|
||||
- if (spi_cfg->tx_clock_polarity == OMAP_MCBSP_CLK_RISING)
|
||||
- mcbsp_cfg.pcr0 &= ~CLKXP;
|
||||
- else
|
||||
- mcbsp_cfg.pcr0 |= CLKXP;
|
||||
-
|
||||
- /* Set SCLKME to 0 and CLKSM to 1 */
|
||||
- mcbsp_cfg.pcr0 &= ~SCLKME;
|
||||
- mcbsp_cfg.srgr2 |= CLKSM;
|
||||
-
|
||||
- /* Set FSXP */
|
||||
- if (spi_cfg->fsx_polarity == OMAP_MCBSP_FS_ACTIVE_HIGH)
|
||||
- mcbsp_cfg.pcr0 &= ~FSXP;
|
||||
- else
|
||||
- mcbsp_cfg.pcr0 |= FSXP;
|
||||
-
|
||||
- if (spi_cfg->spi_mode == OMAP_MCBSP_SPI_MASTER) {
|
||||
- mcbsp_cfg.pcr0 |= CLKXM;
|
||||
- mcbsp_cfg.srgr1 |= CLKGDV(spi_cfg->clk_div - 1);
|
||||
- mcbsp_cfg.pcr0 |= FSXM;
|
||||
- mcbsp_cfg.srgr2 &= ~FSGM;
|
||||
- mcbsp_cfg.xcr2 |= XDATDLY(1);
|
||||
- mcbsp_cfg.rcr2 |= RDATDLY(1);
|
||||
- } else {
|
||||
- mcbsp_cfg.pcr0 &= ~CLKXM;
|
||||
- mcbsp_cfg.srgr1 |= CLKGDV(1);
|
||||
- mcbsp_cfg.pcr0 &= ~FSXM;
|
||||
- mcbsp_cfg.xcr2 &= ~XDATDLY(3);
|
||||
- mcbsp_cfg.rcr2 &= ~RDATDLY(3);
|
||||
- }
|
||||
-
|
||||
- mcbsp_cfg.xcr2 &= ~XPHASE;
|
||||
- mcbsp_cfg.rcr2 &= ~RPHASE;
|
||||
-
|
||||
- omap_mcbsp_config(id, &mcbsp_cfg);
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_set_spi_mode);
|
||||
-
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
#define max_thres(m) (mcbsp->pdata->buffer_size)
|
||||
#define valid_threshold(m, val) ((val) <= max_thres(m))
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-548
@@ -1,548 +0,0 @@
|
||||
From 8eea6f162c7a82d44c8e7c444cadfa43c4d586e5 Mon Sep 17 00:00:00 2001
|
||||
From: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Date: Tue, 14 Jun 2011 11:23:52 +0000
|
||||
Subject: [PATCH 020/149] omap: mcbsp: Drop in-driver transfer support
|
||||
|
||||
We haven't seen either use for in-driver transfer API in McBSP driver
|
||||
over the years so it looks they can be removed too.
|
||||
|
||||
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/plat-omap/include/plat/mcbsp.h | 25 --
|
||||
arch/arm/plat-omap/mcbsp.c | 382 ++-----------------------------
|
||||
2 files changed, 19 insertions(+), 388 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
index 3fc75a8..6c53508 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
@@ -24,7 +24,6 @@
|
||||
#ifndef __ASM_ARCH_OMAP_MCBSP_H
|
||||
#define __ASM_ARCH_OMAP_MCBSP_H
|
||||
|
||||
-#include <linux/completion.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
@@ -340,10 +339,6 @@ typedef enum {
|
||||
OMAP_MCBSP5
|
||||
} omap_mcbsp_id;
|
||||
|
||||
-typedef int __bitwise omap_mcbsp_io_type_t;
|
||||
-#define OMAP_MCBSP_IRQ_IO ((__force omap_mcbsp_io_type_t) 1)
|
||||
-#define OMAP_MCBSP_POLL_IO ((__force omap_mcbsp_io_type_t) 2)
|
||||
-
|
||||
typedef enum {
|
||||
OMAP_MCBSP_WORD_8 = 0,
|
||||
OMAP_MCBSP_WORD_12,
|
||||
@@ -393,22 +388,12 @@ struct omap_mcbsp {
|
||||
omap_mcbsp_word_length rx_word_length;
|
||||
omap_mcbsp_word_length tx_word_length;
|
||||
|
||||
- omap_mcbsp_io_type_t io_type; /* IRQ or poll */
|
||||
- /* IRQ based TX/RX */
|
||||
int rx_irq;
|
||||
int tx_irq;
|
||||
|
||||
/* DMA stuff */
|
||||
u8 dma_rx_sync;
|
||||
- short dma_rx_lch;
|
||||
u8 dma_tx_sync;
|
||||
- short dma_tx_lch;
|
||||
-
|
||||
- /* Completion queues */
|
||||
- struct completion tx_irq_completion;
|
||||
- struct completion rx_irq_completion;
|
||||
- struct completion tx_dma_completion;
|
||||
- struct completion rx_dma_completion;
|
||||
|
||||
/* Protect the field .free, while checking if the mcbsp is in use */
|
||||
spinlock_t lock;
|
||||
@@ -467,20 +452,10 @@ int omap_mcbsp_request(unsigned int id);
|
||||
void omap_mcbsp_free(unsigned int id);
|
||||
void omap_mcbsp_start(unsigned int id, int tx, int rx);
|
||||
void omap_mcbsp_stop(unsigned int id, int tx, int rx);
|
||||
-void omap_mcbsp_xmit_word(unsigned int id, u32 word);
|
||||
-u32 omap_mcbsp_recv_word(unsigned int id);
|
||||
-
|
||||
-int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
|
||||
-int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer, unsigned int length);
|
||||
|
||||
/* McBSP functional clock source changing function */
|
||||
extern int omap2_mcbsp_set_clks_src(u8 id, u8 fck_src_id);
|
||||
|
||||
-/* Polled read/write functions */
|
||||
-int omap_mcbsp_pollread(unsigned int id, u16 * buf);
|
||||
-int omap_mcbsp_pollwrite(unsigned int id, u16 buf);
|
||||
-int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type);
|
||||
-
|
||||
/* McBSP signal muxing API */
|
||||
void omap2_mcbsp1_mux_clkr_src(u8 mux);
|
||||
void omap2_mcbsp1_mux_fsr_src(u8 mux);
|
||||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
|
||||
index 1de2724..455eadc 100644
|
||||
--- a/arch/arm/plat-omap/mcbsp.c
|
||||
+++ b/arch/arm/plat-omap/mcbsp.c
|
||||
@@ -16,8 +16,6 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/platform_device.h>
|
||||
-#include <linux/wait.h>
|
||||
-#include <linux/completion.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
@@ -25,7 +23,6 @@
|
||||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
-#include <plat/dma.h>
|
||||
#include <plat/mcbsp.h>
|
||||
#include <plat/omap_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
@@ -136,8 +133,6 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
|
||||
irqst_spcr2);
|
||||
/* Writing zero to XSYNC_ERR clears the IRQ */
|
||||
MCBSP_WRITE(mcbsp_tx, SPCR2, MCBSP_READ_CACHE(mcbsp_tx, SPCR2));
|
||||
- } else {
|
||||
- complete(&mcbsp_tx->tx_irq_completion);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
@@ -156,41 +151,11 @@ static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
|
||||
irqst_spcr1);
|
||||
/* Writing zero to RSYNC_ERR clears the IRQ */
|
||||
MCBSP_WRITE(mcbsp_rx, SPCR1, MCBSP_READ_CACHE(mcbsp_rx, SPCR1));
|
||||
- } else {
|
||||
- complete(&mcbsp_rx->rx_irq_completion);
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
-static void omap_mcbsp_tx_dma_callback(int lch, u16 ch_status, void *data)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp_dma_tx = data;
|
||||
-
|
||||
- dev_dbg(mcbsp_dma_tx->dev, "TX DMA callback : 0x%x\n",
|
||||
- MCBSP_READ(mcbsp_dma_tx, SPCR2));
|
||||
-
|
||||
- /* We can free the channels */
|
||||
- omap_free_dma(mcbsp_dma_tx->dma_tx_lch);
|
||||
- mcbsp_dma_tx->dma_tx_lch = -1;
|
||||
-
|
||||
- complete(&mcbsp_dma_tx->tx_dma_completion);
|
||||
-}
|
||||
-
|
||||
-static void omap_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp_dma_rx = data;
|
||||
-
|
||||
- dev_dbg(mcbsp_dma_rx->dev, "RX DMA callback : 0x%x\n",
|
||||
- MCBSP_READ(mcbsp_dma_rx, SPCR2));
|
||||
-
|
||||
- /* We can free the channels */
|
||||
- omap_free_dma(mcbsp_dma_rx->dma_rx_lch);
|
||||
- mcbsp_dma_rx->dma_rx_lch = -1;
|
||||
-
|
||||
- complete(&mcbsp_dma_rx->rx_dma_completion);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* omap_mcbsp_config simply write a config to the
|
||||
* appropriate McBSP.
|
||||
@@ -758,37 +723,6 @@ static inline void omap_st_start(struct omap_mcbsp *mcbsp) {}
|
||||
static inline void omap_st_stop(struct omap_mcbsp *mcbsp) {}
|
||||
#endif
|
||||
|
||||
-/*
|
||||
- * We can choose between IRQ based or polled IO.
|
||||
- * This needs to be called before omap_mcbsp_request().
|
||||
- */
|
||||
-int omap_mcbsp_set_io_type(unsigned int id, omap_mcbsp_io_type_t io_type)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- spin_lock(&mcbsp->lock);
|
||||
-
|
||||
- if (!mcbsp->free) {
|
||||
- dev_err(mcbsp->dev, "McBSP%d is currently in use\n",
|
||||
- mcbsp->id);
|
||||
- spin_unlock(&mcbsp->lock);
|
||||
- return -EINVAL;
|
||||
- }
|
||||
-
|
||||
- mcbsp->io_type = io_type;
|
||||
-
|
||||
- spin_unlock(&mcbsp->lock);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_set_io_type);
|
||||
-
|
||||
int omap_mcbsp_request(unsigned int id)
|
||||
{
|
||||
struct omap_mcbsp *mcbsp;
|
||||
@@ -833,29 +767,24 @@ int omap_mcbsp_request(unsigned int id)
|
||||
MCBSP_WRITE(mcbsp, SPCR1, 0);
|
||||
MCBSP_WRITE(mcbsp, SPCR2, 0);
|
||||
|
||||
- if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
|
||||
- /* We need to get IRQs here */
|
||||
- init_completion(&mcbsp->tx_irq_completion);
|
||||
- err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
|
||||
- 0, "McBSP", (void *)mcbsp);
|
||||
+ err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
|
||||
+ 0, "McBSP", (void *)mcbsp);
|
||||
+ if (err != 0) {
|
||||
+ dev_err(mcbsp->dev, "Unable to request TX IRQ %d "
|
||||
+ "for McBSP%d\n", mcbsp->tx_irq,
|
||||
+ mcbsp->id);
|
||||
+ goto err_clk_disable;
|
||||
+ }
|
||||
+
|
||||
+ if (mcbsp->rx_irq) {
|
||||
+ err = request_irq(mcbsp->rx_irq,
|
||||
+ omap_mcbsp_rx_irq_handler,
|
||||
+ 0, "McBSP", (void *)mcbsp);
|
||||
if (err != 0) {
|
||||
- dev_err(mcbsp->dev, "Unable to request TX IRQ %d "
|
||||
- "for McBSP%d\n", mcbsp->tx_irq,
|
||||
+ dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
|
||||
+ "for McBSP%d\n", mcbsp->rx_irq,
|
||||
mcbsp->id);
|
||||
- goto err_clk_disable;
|
||||
- }
|
||||
-
|
||||
- if (mcbsp->rx_irq) {
|
||||
- init_completion(&mcbsp->rx_irq_completion);
|
||||
- err = request_irq(mcbsp->rx_irq,
|
||||
- omap_mcbsp_rx_irq_handler,
|
||||
- 0, "McBSP", (void *)mcbsp);
|
||||
- if (err != 0) {
|
||||
- dev_err(mcbsp->dev, "Unable to request RX IRQ %d "
|
||||
- "for McBSP%d\n", mcbsp->rx_irq,
|
||||
- mcbsp->id);
|
||||
- goto err_free_irq;
|
||||
- }
|
||||
+ goto err_free_irq;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -901,12 +830,9 @@ void omap_mcbsp_free(unsigned int id)
|
||||
|
||||
pm_runtime_put_sync(mcbsp->dev);
|
||||
|
||||
- if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
|
||||
- /* Free IRQs */
|
||||
- if (mcbsp->rx_irq)
|
||||
- free_irq(mcbsp->rx_irq, (void *)mcbsp);
|
||||
- free_irq(mcbsp->tx_irq, (void *)mcbsp);
|
||||
- }
|
||||
+ if (mcbsp->rx_irq)
|
||||
+ free_irq(mcbsp->rx_irq, (void *)mcbsp);
|
||||
+ free_irq(mcbsp->tx_irq, (void *)mcbsp);
|
||||
|
||||
reg_cache = mcbsp->reg_cache;
|
||||
|
||||
@@ -1043,271 +969,6 @@ void omap_mcbsp_stop(unsigned int id, int tx, int rx)
|
||||
}
|
||||
EXPORT_SYMBOL(omap_mcbsp_stop);
|
||||
|
||||
-/* polled mcbsp i/o operations */
|
||||
-int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
-
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- MCBSP_WRITE(mcbsp, DXR1, buf);
|
||||
- /* if frame sync error - clear the error */
|
||||
- if (MCBSP_READ(mcbsp, SPCR2) & XSYNC_ERR) {
|
||||
- /* clear error */
|
||||
- MCBSP_WRITE(mcbsp, SPCR2, MCBSP_READ_CACHE(mcbsp, SPCR2));
|
||||
- /* resend */
|
||||
- return -1;
|
||||
- } else {
|
||||
- /* wait for transmit confirmation */
|
||||
- int attemps = 0;
|
||||
- while (!(MCBSP_READ(mcbsp, SPCR2) & XRDY)) {
|
||||
- if (attemps++ > 1000) {
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) &
|
||||
- (~XRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR2,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR2) |
|
||||
- (XRST));
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "Could not write to"
|
||||
- " McBSP%d Register\n", mcbsp->id);
|
||||
- return -2;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_pollwrite);
|
||||
-
|
||||
-int omap_mcbsp_pollread(unsigned int id, u16 *buf)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- /* if frame sync error - clear the error */
|
||||
- if (MCBSP_READ(mcbsp, SPCR1) & RSYNC_ERR) {
|
||||
- /* clear error */
|
||||
- MCBSP_WRITE(mcbsp, SPCR1, MCBSP_READ_CACHE(mcbsp, SPCR1));
|
||||
- /* resend */
|
||||
- return -1;
|
||||
- } else {
|
||||
- /* wait for receive confirmation */
|
||||
- int attemps = 0;
|
||||
- while (!(MCBSP_READ(mcbsp, SPCR1) & RRDY)) {
|
||||
- if (attemps++ > 1000) {
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) &
|
||||
- (~RRST));
|
||||
- udelay(10);
|
||||
- MCBSP_WRITE(mcbsp, SPCR1,
|
||||
- MCBSP_READ_CACHE(mcbsp, SPCR1) |
|
||||
- (RRST));
|
||||
- udelay(10);
|
||||
- dev_err(mcbsp->dev, "Could not read from"
|
||||
- " McBSP%d Register\n", mcbsp->id);
|
||||
- return -2;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- *buf = MCBSP_READ(mcbsp, DRR1);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_pollread);
|
||||
-
|
||||
-/*
|
||||
- * IRQ based word transmission.
|
||||
- */
|
||||
-void omap_mcbsp_xmit_word(unsigned int id, u32 word)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- omap_mcbsp_word_length word_length;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
- word_length = mcbsp->tx_word_length;
|
||||
-
|
||||
- wait_for_completion(&mcbsp->tx_irq_completion);
|
||||
-
|
||||
- if (word_length > OMAP_MCBSP_WORD_16)
|
||||
- MCBSP_WRITE(mcbsp, DXR2, word >> 16);
|
||||
- MCBSP_WRITE(mcbsp, DXR1, word & 0xffff);
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_xmit_word);
|
||||
-
|
||||
-u32 omap_mcbsp_recv_word(unsigned int id)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- u16 word_lsb, word_msb = 0;
|
||||
- omap_mcbsp_word_length word_length;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- word_length = mcbsp->rx_word_length;
|
||||
-
|
||||
- wait_for_completion(&mcbsp->rx_irq_completion);
|
||||
-
|
||||
- if (word_length > OMAP_MCBSP_WORD_16)
|
||||
- word_msb = MCBSP_READ(mcbsp, DRR2);
|
||||
- word_lsb = MCBSP_READ(mcbsp, DRR1);
|
||||
-
|
||||
- return (word_lsb | (word_msb << 16));
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_recv_word);
|
||||
-
|
||||
-/*
|
||||
- * Simple DMA based buffer rx/tx routines.
|
||||
- * Nothing fancy, just a single buffer tx/rx through DMA.
|
||||
- * The DMA resources are released once the transfer is done.
|
||||
- * For anything fancier, you should use your own customized DMA
|
||||
- * routines and callbacks.
|
||||
- */
|
||||
-int omap_mcbsp_xmit_buffer(unsigned int id, dma_addr_t buffer,
|
||||
- unsigned int length)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- int dma_tx_ch;
|
||||
- int src_port = 0;
|
||||
- int dest_port = 0;
|
||||
- int sync_dev = 0;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- if (omap_request_dma(mcbsp->dma_tx_sync, "McBSP TX",
|
||||
- omap_mcbsp_tx_dma_callback,
|
||||
- mcbsp,
|
||||
- &dma_tx_ch)) {
|
||||
- dev_err(mcbsp->dev, " Unable to request DMA channel for "
|
||||
- "McBSP%d TX. Trying IRQ based TX\n",
|
||||
- mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- mcbsp->dma_tx_lch = dma_tx_ch;
|
||||
-
|
||||
- dev_err(mcbsp->dev, "McBSP%d TX DMA on channel %d\n", mcbsp->id,
|
||||
- dma_tx_ch);
|
||||
-
|
||||
- init_completion(&mcbsp->tx_dma_completion);
|
||||
-
|
||||
- if (cpu_class_is_omap1()) {
|
||||
- src_port = OMAP_DMA_PORT_TIPB;
|
||||
- dest_port = OMAP_DMA_PORT_EMIFF;
|
||||
- }
|
||||
- if (cpu_class_is_omap2())
|
||||
- sync_dev = mcbsp->dma_tx_sync;
|
||||
-
|
||||
- omap_set_dma_transfer_params(mcbsp->dma_tx_lch,
|
||||
- OMAP_DMA_DATA_TYPE_S16,
|
||||
- length >> 1, 1,
|
||||
- OMAP_DMA_SYNC_ELEMENT,
|
||||
- sync_dev, 0);
|
||||
-
|
||||
- omap_set_dma_dest_params(mcbsp->dma_tx_lch,
|
||||
- src_port,
|
||||
- OMAP_DMA_AMODE_CONSTANT,
|
||||
- mcbsp->phys_base + OMAP_MCBSP_REG_DXR1,
|
||||
- 0, 0);
|
||||
-
|
||||
- omap_set_dma_src_params(mcbsp->dma_tx_lch,
|
||||
- dest_port,
|
||||
- OMAP_DMA_AMODE_POST_INC,
|
||||
- buffer,
|
||||
- 0, 0);
|
||||
-
|
||||
- omap_start_dma(mcbsp->dma_tx_lch);
|
||||
- wait_for_completion(&mcbsp->tx_dma_completion);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_xmit_buffer);
|
||||
-
|
||||
-int omap_mcbsp_recv_buffer(unsigned int id, dma_addr_t buffer,
|
||||
- unsigned int length)
|
||||
-{
|
||||
- struct omap_mcbsp *mcbsp;
|
||||
- int dma_rx_ch;
|
||||
- int src_port = 0;
|
||||
- int dest_port = 0;
|
||||
- int sync_dev = 0;
|
||||
-
|
||||
- if (!omap_mcbsp_check_valid_id(id)) {
|
||||
- printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1);
|
||||
- return -ENODEV;
|
||||
- }
|
||||
- mcbsp = id_to_mcbsp_ptr(id);
|
||||
-
|
||||
- if (omap_request_dma(mcbsp->dma_rx_sync, "McBSP RX",
|
||||
- omap_mcbsp_rx_dma_callback,
|
||||
- mcbsp,
|
||||
- &dma_rx_ch)) {
|
||||
- dev_err(mcbsp->dev, "Unable to request DMA channel for "
|
||||
- "McBSP%d RX. Trying IRQ based RX\n",
|
||||
- mcbsp->id);
|
||||
- return -EAGAIN;
|
||||
- }
|
||||
- mcbsp->dma_rx_lch = dma_rx_ch;
|
||||
-
|
||||
- dev_err(mcbsp->dev, "McBSP%d RX DMA on channel %d\n", mcbsp->id,
|
||||
- dma_rx_ch);
|
||||
-
|
||||
- init_completion(&mcbsp->rx_dma_completion);
|
||||
-
|
||||
- if (cpu_class_is_omap1()) {
|
||||
- src_port = OMAP_DMA_PORT_TIPB;
|
||||
- dest_port = OMAP_DMA_PORT_EMIFF;
|
||||
- }
|
||||
- if (cpu_class_is_omap2())
|
||||
- sync_dev = mcbsp->dma_rx_sync;
|
||||
-
|
||||
- omap_set_dma_transfer_params(mcbsp->dma_rx_lch,
|
||||
- OMAP_DMA_DATA_TYPE_S16,
|
||||
- length >> 1, 1,
|
||||
- OMAP_DMA_SYNC_ELEMENT,
|
||||
- sync_dev, 0);
|
||||
-
|
||||
- omap_set_dma_src_params(mcbsp->dma_rx_lch,
|
||||
- src_port,
|
||||
- OMAP_DMA_AMODE_CONSTANT,
|
||||
- mcbsp->phys_base + OMAP_MCBSP_REG_DRR1,
|
||||
- 0, 0);
|
||||
-
|
||||
- omap_set_dma_dest_params(mcbsp->dma_rx_lch,
|
||||
- dest_port,
|
||||
- OMAP_DMA_AMODE_POST_INC,
|
||||
- buffer,
|
||||
- 0, 0);
|
||||
-
|
||||
- omap_start_dma(mcbsp->dma_rx_lch);
|
||||
- wait_for_completion(&mcbsp->rx_dma_completion);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-EXPORT_SYMBOL(omap_mcbsp_recv_buffer);
|
||||
-
|
||||
#ifdef CONFIG_ARCH_OMAP3
|
||||
#define max_thres(m) (mcbsp->pdata->buffer_size)
|
||||
#define valid_threshold(m, val) ((val) <= max_thres(m))
|
||||
@@ -1619,8 +1280,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&mcbsp->lock);
|
||||
mcbsp->id = id + 1;
|
||||
mcbsp->free = true;
|
||||
- mcbsp->dma_tx_lch = -1;
|
||||
- mcbsp->dma_rx_lch = -1;
|
||||
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
|
||||
if (!res) {
|
||||
@@ -1646,9 +1305,6 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev)
|
||||
else
|
||||
mcbsp->phys_dma_base = res->start;
|
||||
|
||||
- /* Default I/O is IRQ based */
|
||||
- mcbsp->io_type = OMAP_MCBSP_IRQ_IO;
|
||||
-
|
||||
mcbsp->tx_irq = platform_get_irq_byname(pdev, "tx");
|
||||
mcbsp->rx_irq = platform_get_irq_byname(pdev, "rx");
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From 742b21718c968c17ac951b73b4ba79f4a489d35b Mon Sep 17 00:00:00 2001
|
||||
From: Arnd Bergmann <arnd@arndb.de>
|
||||
Date: Thu, 30 Jun 2011 12:58:01 +0000
|
||||
Subject: [PATCH 021/149] omap2+: fix build regression
|
||||
|
||||
board-generic.c now contains a reference to omap3_timer, but depends
|
||||
only on ARCH_OMAP2, not on ARCH_OMAP3, which controls that symbol.
|
||||
omap2_timer seems to be more appropriate anyway, so use that instead.
|
||||
|
||||
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-generic.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
|
||||
index c6ecf60..54db41a 100644
|
||||
--- a/arch/arm/mach-omap2/board-generic.c
|
||||
+++ b/arch/arm/mach-omap2/board-generic.c
|
||||
@@ -72,5 +72,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
|
||||
.init_early = omap_generic_init_early,
|
||||
.init_irq = omap2_init_irq,
|
||||
.init_machine = omap_generic_init,
|
||||
- .timer = &omap3_timer,
|
||||
+ .timer = &omap2_timer,
|
||||
MACHINE_END
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-200
@@ -1,200 +0,0 @@
|
||||
From 552daa4d00a2c1835e5114af852efc65175e1cc0 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Sat, 4 Jun 2011 08:16:41 +0300
|
||||
Subject: [PATCH 022/149] OMAP: New twl-common for common TWL configuration
|
||||
|
||||
Introduce a new file, which will be used to configure
|
||||
common pmic (TWL) devices, regulators, and TWL audio.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/Makefile | 2 +-
|
||||
arch/arm/mach-omap2/common-board-devices.c | 21 -------------
|
||||
arch/arm/mach-omap2/common-board-devices.h | 26 +--------------
|
||||
arch/arm/mach-omap2/twl-common.c | 46 ++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/twl-common.h | 28 +++++++++++++++++
|
||||
5 files changed, 77 insertions(+), 46 deletions(-)
|
||||
create mode 100644 arch/arm/mach-omap2/twl-common.c
|
||||
create mode 100644 arch/arm/mach-omap2/twl-common.h
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
|
||||
index adbe82d..ff1466f 100644
|
||||
--- a/arch/arm/mach-omap2/Makefile
|
||||
+++ b/arch/arm/mach-omap2/Makefile
|
||||
@@ -269,4 +269,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
|
||||
disp-$(CONFIG_OMAP2_DSS) := display.o
|
||||
obj-y += $(disp-m) $(disp-y)
|
||||
|
||||
-obj-y += common-board-devices.o
|
||||
+obj-y += common-board-devices.o twl-common.o
|
||||
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
|
||||
index 0043fa8..bcb0c58 100644
|
||||
--- a/arch/arm/mach-omap2/common-board-devices.c
|
||||
+++ b/arch/arm/mach-omap2/common-board-devices.c
|
||||
@@ -20,36 +20,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#include <linux/i2c.h>
|
||||
-#include <linux/i2c/twl.h>
|
||||
-
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
|
||||
-#include <plat/i2c.h>
|
||||
#include <plat/mcspi.h>
|
||||
#include <plat/nand.h>
|
||||
|
||||
#include "common-board-devices.h"
|
||||
|
||||
-static struct i2c_board_info __initdata pmic_i2c_board_info = {
|
||||
- .addr = 0x48,
|
||||
- .flags = I2C_CLIENT_WAKE,
|
||||
-};
|
||||
-
|
||||
-void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
- const char *pmic_type, int pmic_irq,
|
||||
- struct twl4030_platform_data *pmic_data)
|
||||
-{
|
||||
- strncpy(pmic_i2c_board_info.type, pmic_type,
|
||||
- sizeof(pmic_i2c_board_info.type));
|
||||
- pmic_i2c_board_info.irq = pmic_irq;
|
||||
- pmic_i2c_board_info.platform_data = pmic_data;
|
||||
-
|
||||
- omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
|
||||
-}
|
||||
-
|
||||
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
|
||||
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
|
||||
static struct omap2_mcspi_device_config ads7846_mcspi_config = {
|
||||
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
|
||||
index 6797190..a0b4a428 100644
|
||||
--- a/arch/arm/mach-omap2/common-board-devices.h
|
||||
+++ b/arch/arm/mach-omap2/common-board-devices.h
|
||||
@@ -1,33 +1,11 @@
|
||||
#ifndef __OMAP_COMMON_BOARD_DEVICES__
|
||||
#define __OMAP_COMMON_BOARD_DEVICES__
|
||||
|
||||
+#include "twl-common.h"
|
||||
+
|
||||
#define NAND_BLOCK_SIZE SZ_128K
|
||||
|
||||
-struct twl4030_platform_data;
|
||||
struct mtd_partition;
|
||||
-
|
||||
-void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
|
||||
- struct twl4030_platform_data *pmic_data);
|
||||
-
|
||||
-static inline void omap2_pmic_init(const char *pmic_type,
|
||||
- struct twl4030_platform_data *pmic_data)
|
||||
-{
|
||||
- omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
|
||||
-}
|
||||
-
|
||||
-static inline void omap3_pmic_init(const char *pmic_type,
|
||||
- struct twl4030_platform_data *pmic_data)
|
||||
-{
|
||||
- omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
|
||||
-}
|
||||
-
|
||||
-static inline void omap4_pmic_init(const char *pmic_type,
|
||||
- struct twl4030_platform_data *pmic_data)
|
||||
-{
|
||||
- /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
|
||||
- omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
|
||||
-}
|
||||
-
|
||||
struct ads7846_platform_data;
|
||||
|
||||
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
|
||||
new file mode 100644
|
||||
index 0000000..4f7b24c
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/twl-common.c
|
||||
@@ -0,0 +1,46 @@
|
||||
+/*
|
||||
+ * twl-common.c
|
||||
+ *
|
||||
+ * Copyright (C) 2011 Texas Instruments, Inc..
|
||||
+ * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
+ *
|
||||
+ * 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.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful, but
|
||||
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License
|
||||
+ * along with this program; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
+ * 02110-1301 USA
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/i2c.h>
|
||||
+#include <linux/i2c/twl.h>
|
||||
+#include <linux/gpio.h>
|
||||
+
|
||||
+#include <plat/i2c.h>
|
||||
+
|
||||
+#include "twl-common.h"
|
||||
+
|
||||
+static struct i2c_board_info __initdata pmic_i2c_board_info = {
|
||||
+ .addr = 0x48,
|
||||
+ .flags = I2C_CLIENT_WAKE,
|
||||
+};
|
||||
+
|
||||
+void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
+ const char *pmic_type, int pmic_irq,
|
||||
+ struct twl4030_platform_data *pmic_data)
|
||||
+{
|
||||
+ strncpy(pmic_i2c_board_info.type, pmic_type,
|
||||
+ sizeof(pmic_i2c_board_info.type));
|
||||
+ pmic_i2c_board_info.irq = pmic_irq;
|
||||
+ pmic_i2c_board_info.platform_data = pmic_data;
|
||||
+
|
||||
+ omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
|
||||
+}
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
|
||||
new file mode 100644
|
||||
index 0000000..e9fe2ab
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/mach-omap2/twl-common.h
|
||||
@@ -0,0 +1,28 @@
|
||||
+#ifndef __OMAP_PMIC_COMMON__
|
||||
+#define __OMAP_PMIC_COMMON__
|
||||
+
|
||||
+struct twl4030_platform_data;
|
||||
+
|
||||
+void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
|
||||
+ struct twl4030_platform_data *pmic_data);
|
||||
+
|
||||
+static inline void omap2_pmic_init(const char *pmic_type,
|
||||
+ struct twl4030_platform_data *pmic_data)
|
||||
+{
|
||||
+ omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
|
||||
+}
|
||||
+
|
||||
+static inline void omap3_pmic_init(const char *pmic_type,
|
||||
+ struct twl4030_platform_data *pmic_data)
|
||||
+{
|
||||
+ omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
|
||||
+}
|
||||
+
|
||||
+static inline void omap4_pmic_init(const char *pmic_type,
|
||||
+ struct twl4030_platform_data *pmic_data)
|
||||
+{
|
||||
+ /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
|
||||
+ omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
|
||||
+}
|
||||
+
|
||||
+#endif /* __OMAP_PMIC_COMMON__ */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-601
@@ -1,601 +0,0 @@
|
||||
From db3a6400c5bc9c99a39fe9b34b7b3c59ae4be245 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Tue, 7 Jun 2011 10:26:46 +0300
|
||||
Subject: [PATCH 023/149] OMAP4: Move common twl6030 configuration to twl-common
|
||||
|
||||
Reduce the amount of duplicated code by moving the common
|
||||
configuration for TWL6030 (on OMAP4 platform) to the
|
||||
twl-common file.
|
||||
Use the omap4_pmic_get_config function from board files to
|
||||
properly configure the PMIC with the common fields.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-4430sdp.c | 141 ++-------------------------
|
||||
arch/arm/mach-omap2/board-omap4panda.c | 146 +++--------------------------
|
||||
arch/arm/mach-omap2/twl-common.c | 163 ++++++++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/twl-common.h | 20 ++++
|
||||
4 files changed, 205 insertions(+), 265 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
index d7df07e..933b25b 100644
|
||||
--- a/arch/arm/mach-omap2/board-4430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-4430sdp.c
|
||||
@@ -302,14 +302,6 @@ static struct omap_musb_board_data musb_board_data = {
|
||||
.power = 100,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data omap4_usbphy_data = {
|
||||
- .phy_init = omap4430_phy_init,
|
||||
- .phy_exit = omap4430_phy_exit,
|
||||
- .phy_power = omap4430_phy_power,
|
||||
- .phy_set_clock = omap4430_phy_set_clk,
|
||||
- .phy_suspend = omap4430_phy_suspend,
|
||||
-};
|
||||
-
|
||||
static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 2,
|
||||
@@ -332,10 +324,6 @@ static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
|
||||
- REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
-};
|
||||
-
|
||||
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -394,61 +382,6 @@ static struct regulator_init_data sdp4430_vaux1 = {
|
||||
.consumer_supplies = sdp4430_vaux_supply,
|
||||
};
|
||||
|
||||
-static struct regulator_init_data sdp4430_vaux2 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1200000,
|
||||
- .max_uV = 2800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_vaux3 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1000000,
|
||||
- .max_uV = 3000000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-/* VMMC1 for MMC1 card */
|
||||
-static struct regulator_init_data sdp4430_vmmc = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1200000,
|
||||
- .max_uV = 3000000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = 1,
|
||||
- .consumer_supplies = sdp4430_vmmc_supply,
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_vpp = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 2500000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
static struct regulator_init_data sdp4430_vusim = {
|
||||
.constraints = {
|
||||
.min_uV = 1200000,
|
||||
@@ -462,74 +395,10 @@ static struct regulator_init_data sdp4430_vusim = {
|
||||
},
|
||||
};
|
||||
|
||||
-static struct regulator_init_data sdp4430_vana = {
|
||||
- .constraints = {
|
||||
- .min_uV = 2100000,
|
||||
- .max_uV = 2100000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_vcxio = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_vusb = {
|
||||
- .constraints = {
|
||||
- .min_uV = 3300000,
|
||||
- .max_uV = 3300000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp4430_clk32kg = {
|
||||
- .constraints = {
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data sdp4430_twldata = {
|
||||
- .irq_base = TWL6030_IRQ_BASE,
|
||||
- .irq_end = TWL6030_IRQ_END,
|
||||
-
|
||||
/* Regulators */
|
||||
- .vmmc = &sdp4430_vmmc,
|
||||
- .vpp = &sdp4430_vpp,
|
||||
.vusim = &sdp4430_vusim,
|
||||
- .vana = &sdp4430_vana,
|
||||
- .vcxio = &sdp4430_vcxio,
|
||||
- .vdac = &sdp4430_vdac,
|
||||
- .vusb = &sdp4430_vusb,
|
||||
.vaux1 = &sdp4430_vaux1,
|
||||
- .vaux2 = &sdp4430_vaux2,
|
||||
- .vaux3 = &sdp4430_vaux3,
|
||||
- .clk32kg = &sdp4430_clk32kg,
|
||||
- .usb = &omap4_usbphy_data
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
|
||||
@@ -547,6 +416,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
|
||||
};
|
||||
static int __init omap4_i2c_init(void)
|
||||
{
|
||||
+ omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
|
||||
+ TWL_COMMON_REGULATOR_VDAC |
|
||||
+ TWL_COMMON_REGULATOR_VAUX2 |
|
||||
+ TWL_COMMON_REGULATOR_VAUX3 |
|
||||
+ TWL_COMMON_REGULATOR_VMMC |
|
||||
+ TWL_COMMON_REGULATOR_VPP |
|
||||
+ TWL_COMMON_REGULATOR_VANA |
|
||||
+ TWL_COMMON_REGULATOR_VCXIO |
|
||||
+ TWL_COMMON_REGULATOR_VUSB |
|
||||
+ TWL_COMMON_REGULATOR_CLK32KG);
|
||||
omap4_pmic_init("twl6030", &sdp4430_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
|
||||
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
index ee2034e..9aaa960 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap4panda.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap4panda.c
|
||||
@@ -154,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = {
|
||||
.power = 100,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data omap4_usbphy_data = {
|
||||
- .phy_init = omap4430_phy_init,
|
||||
- .phy_exit = omap4430_phy_exit,
|
||||
- .phy_power = omap4430_phy_power,
|
||||
- .phy_set_clock = omap4430_phy_set_clk,
|
||||
- .phy_suspend = omap4430_phy_suspend,
|
||||
-};
|
||||
-
|
||||
static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
@@ -181,10 +173,6 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
|
||||
- REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
|
||||
};
|
||||
@@ -269,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static struct regulator_init_data omap4_panda_vaux2 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1200000,
|
||||
- .max_uV = 2800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vaux3 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1000000,
|
||||
- .max_uV = 3000000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-/* VMMC1 for MMC1 card */
|
||||
-static struct regulator_init_data omap4_panda_vmmc = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1200000,
|
||||
- .max_uV = 3000000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc_supply),
|
||||
- .consumer_supplies = omap4_panda_vmmc_supply,
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vpp = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 2500000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
- | REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vana = {
|
||||
- .constraints = {
|
||||
- .min_uV = 2100000,
|
||||
- .max_uV = 2100000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vcxio = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_vusb = {
|
||||
- .constraints = {
|
||||
- .min_uV = 3300000,
|
||||
- .max_uV = 3300000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap4_panda_clk32kg = {
|
||||
- .constraints = {
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_platform_data omap4_panda_twldata = {
|
||||
- .irq_base = TWL6030_IRQ_BASE,
|
||||
- .irq_end = TWL6030_IRQ_END,
|
||||
-
|
||||
- /* Regulators */
|
||||
- .vmmc = &omap4_panda_vmmc,
|
||||
- .vpp = &omap4_panda_vpp,
|
||||
- .vana = &omap4_panda_vana,
|
||||
- .vcxio = &omap4_panda_vcxio,
|
||||
- .vdac = &omap4_panda_vdac,
|
||||
- .vusb = &omap4_panda_vusb,
|
||||
- .vaux2 = &omap4_panda_vaux2,
|
||||
- .vaux3 = &omap4_panda_vaux3,
|
||||
- .clk32kg = &omap4_panda_clk32kg,
|
||||
- .usb = &omap4_usbphy_data,
|
||||
-};
|
||||
+/* Panda board uses the common PMIC configuration */
|
||||
+static struct twl4030_platform_data omap4_panda_twldata;
|
||||
|
||||
/*
|
||||
* Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
|
||||
@@ -404,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
|
||||
|
||||
static int __init omap4_panda_i2c_init(void)
|
||||
{
|
||||
+ omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
|
||||
+ TWL_COMMON_REGULATOR_VDAC |
|
||||
+ TWL_COMMON_REGULATOR_VAUX2 |
|
||||
+ TWL_COMMON_REGULATOR_VAUX3 |
|
||||
+ TWL_COMMON_REGULATOR_VMMC |
|
||||
+ TWL_COMMON_REGULATOR_VPP |
|
||||
+ TWL_COMMON_REGULATOR_VANA |
|
||||
+ TWL_COMMON_REGULATOR_VCXIO |
|
||||
+ TWL_COMMON_REGULATOR_VUSB |
|
||||
+ TWL_COMMON_REGULATOR_CLK32KG);
|
||||
omap4_pmic_init("twl6030", &omap4_panda_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
/*
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
|
||||
index 4f7b24c..cf80f4c 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.c
|
||||
+++ b/arch/arm/mach-omap2/twl-common.c
|
||||
@@ -23,8 +23,11 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c/twl.h>
|
||||
#include <linux/gpio.h>
|
||||
+#include <linux/regulator/machine.h>
|
||||
+#include <linux/regulator/fixed.h>
|
||||
|
||||
#include <plat/i2c.h>
|
||||
+#include <plat/usb.h>
|
||||
|
||||
#include "twl-common.h"
|
||||
|
||||
@@ -44,3 +47,163 @@ void __init omap_pmic_init(int bus, u32 clkrate,
|
||||
|
||||
omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
|
||||
}
|
||||
+
|
||||
+static struct twl4030_usb_data omap4_usb_pdata = {
|
||||
+ .phy_init = omap4430_phy_init,
|
||||
+ .phy_exit = omap4430_phy_exit,
|
||||
+ .phy_power = omap4430_phy_power,
|
||||
+ .phy_set_clock = omap4430_phy_set_clk,
|
||||
+ .phy_suspend = omap4430_phy_suspend,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vdac_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vaux2_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1200000,
|
||||
+ .max_uV = 2800000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
+ | REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vaux3_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1000000,
|
||||
+ .max_uV = 3000000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
+ | REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply omap4_vmmc_supply[] = {
|
||||
+ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
+};
|
||||
+
|
||||
+/* VMMC1 for MMC1 card */
|
||||
+static struct regulator_init_data omap4_vmmc_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1200000,
|
||||
+ .max_uV = 3000000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
+ | REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(omap4_vmmc_supply),
|
||||
+ .consumer_supplies = omap4_vmmc_supply,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vpp_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 2500000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
|
||||
+ | REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vana_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 2100000,
|
||||
+ .max_uV = 2100000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vcxio_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_vusb_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 3300000,
|
||||
+ .max_uV = 3300000,
|
||||
+ .apply_uV = true,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap4_clk32kg_idata = {
|
||||
+ .constraints = {
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
+ u32 pdata_flags, u32 regulators_flags)
|
||||
+{
|
||||
+ if (!pmic_data->irq_base)
|
||||
+ pmic_data->irq_base = TWL6030_IRQ_BASE;
|
||||
+ if (!pmic_data->irq_end)
|
||||
+ pmic_data->irq_end = TWL6030_IRQ_END;
|
||||
+
|
||||
+ /* Common platform data configurations */
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
|
||||
+ pmic_data->usb = &omap4_usb_pdata;
|
||||
+
|
||||
+ /* Common regulator configurations */
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
|
||||
+ pmic_data->vdac = &omap4_vdac_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2)
|
||||
+ pmic_data->vaux2 = &omap4_vaux2_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3)
|
||||
+ pmic_data->vaux3 = &omap4_vaux3_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc)
|
||||
+ pmic_data->vmmc = &omap4_vmmc_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp)
|
||||
+ pmic_data->vpp = &omap4_vpp_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana)
|
||||
+ pmic_data->vana = &omap4_vana_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio)
|
||||
+ pmic_data->vcxio = &omap4_vcxio_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb)
|
||||
+ pmic_data->vusb = &omap4_vusb_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
|
||||
+ !pmic_data->clk32kg)
|
||||
+ pmic_data->clk32kg = &omap4_clk32kg_idata;
|
||||
+}
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
|
||||
index e9fe2ab..d96c289 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.h
|
||||
+++ b/arch/arm/mach-omap2/twl-common.h
|
||||
@@ -1,6 +1,23 @@
|
||||
#ifndef __OMAP_PMIC_COMMON__
|
||||
#define __OMAP_PMIC_COMMON__
|
||||
|
||||
+#define TWL_COMMON_PDATA_USB (1 << 0)
|
||||
+
|
||||
+/* Common LDO regulators for TWL4030/TWL6030 */
|
||||
+#define TWL_COMMON_REGULATOR_VDAC (1 << 0)
|
||||
+#define TWL_COMMON_REGULATOR_VAUX1 (1 << 1)
|
||||
+#define TWL_COMMON_REGULATOR_VAUX2 (1 << 2)
|
||||
+#define TWL_COMMON_REGULATOR_VAUX3 (1 << 3)
|
||||
+
|
||||
+/* TWL6030 LDO regulators */
|
||||
+#define TWL_COMMON_REGULATOR_VMMC (1 << 4)
|
||||
+#define TWL_COMMON_REGULATOR_VPP (1 << 5)
|
||||
+#define TWL_COMMON_REGULATOR_VUSIM (1 << 6)
|
||||
+#define TWL_COMMON_REGULATOR_VANA (1 << 7)
|
||||
+#define TWL_COMMON_REGULATOR_VCXIO (1 << 8)
|
||||
+#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
|
||||
+#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
|
||||
+
|
||||
struct twl4030_platform_data;
|
||||
|
||||
void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
|
||||
@@ -25,4 +42,7 @@ static inline void omap4_pmic_init(const char *pmic_type,
|
||||
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
|
||||
}
|
||||
|
||||
+void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
+ u32 pdata_flags, u32 regulators_flags);
|
||||
+
|
||||
#endif /* __OMAP_PMIC_COMMON__ */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-827
@@ -1,827 +0,0 @@
|
||||
From 4a1b31f8aed87737ba84e1e5724ecfbe45732bc8 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Tue, 7 Jun 2011 10:28:54 +0300
|
||||
Subject: [PATCH 024/149] OMAP3: Move common twl configuration to twl-common
|
||||
|
||||
Reduce the amount of duplicated code by moving the common
|
||||
configuration for twl4030/5030/tpsxx to the twl-common file.
|
||||
Use the omap3_pmic_get_config function from board files to
|
||||
properly configure the PMIC with the common fields.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-3430sdp.c | 42 ++------------------
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 9 +----
|
||||
arch/arm/mach-omap2/board-devkit8000.c | 18 +--------
|
||||
arch/arm/mach-omap2/board-igep0020.c | 20 ++--------
|
||||
arch/arm/mach-omap2/board-ldp.c | 15 +------
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 18 +--------
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 24 +----------
|
||||
arch/arm/mach-omap2/board-omap3pandora.c | 17 +-------
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 24 +----------
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 19 +--------
|
||||
arch/arm/mach-omap2/board-overo.c | 17 +-------
|
||||
arch/arm/mach-omap2/board-rm680.c | 8 +---
|
||||
arch/arm/mach-omap2/board-rx51-peripherals.c | 15 +------
|
||||
arch/arm/mach-omap2/board-zoom-peripherals.c | 51 +++++--------------------
|
||||
arch/arm/mach-omap2/twl-common.c | 53 ++++++++++++++++++++++++++
|
||||
arch/arm/mach-omap2/twl-common.h | 6 +++
|
||||
16 files changed, 99 insertions(+), 257 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
index 12fae21..8bbd4e0 100644
|
||||
--- a/arch/arm/mach-omap2/board-3430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void)
|
||||
omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
|
||||
}
|
||||
|
||||
-static int sdp3430_batt_table[] = {
|
||||
-/* 0 C*/
|
||||
-30800, 29500, 28300, 27100,
|
||||
-26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
|
||||
-17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
|
||||
-11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
|
||||
-8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
|
||||
-5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
|
||||
-4040, 3910, 3790, 3670, 3550
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_bci_platform_data sdp3430_bci_data = {
|
||||
- .battery_tmp_tbl = sdp3430_batt_table,
|
||||
- .tblsize = ARRAY_SIZE(sdp3430_batt_table),
|
||||
-};
|
||||
-
|
||||
static struct omap2_hsmmc_info mmc[] = {
|
||||
{
|
||||
.mmc = 1,
|
||||
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
|
||||
.setup = sdp3430_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data sdp3430_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_madc_platform_data sdp3430_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
/* regulator consumer mappings */
|
||||
|
||||
/* ads7846 on SPI */
|
||||
@@ -463,24 +439,10 @@ static struct regulator_init_data sdp3430_vpll2 = {
|
||||
.consumer_supplies = sdp3430_vpll2_supplies,
|
||||
};
|
||||
|
||||
-static struct twl4030_codec_audio_data sdp3430_audio;
|
||||
-
|
||||
-static struct twl4030_codec_data sdp3430_codec = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &sdp3430_audio,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data sdp3430_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .bci = &sdp3430_bci_data,
|
||||
.gpio = &sdp3430_gpio_data,
|
||||
- .madc = &sdp3430_madc_data,
|
||||
.keypad = &sdp3430_kp_data,
|
||||
- .usb = &sdp3430_usb_data,
|
||||
- .codec = &sdp3430_codec,
|
||||
|
||||
.vaux1 = &sdp3430_vaux1,
|
||||
.vaux2 = &sdp3430_vaux2,
|
||||
@@ -496,7 +458,11 @@ static struct twl4030_platform_data sdp3430_twldata = {
|
||||
static int __init omap3430_i2c_init(void)
|
||||
{
|
||||
/* i2c1 for PMIC only */
|
||||
+ omap3_pmic_get_config(&sdp3430_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
+ TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("twl4030", &sdp3430_twldata);
|
||||
+
|
||||
/* i2c2 on camera connector (for sensor control) and optional isp1301 */
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
/* i2c3 on display connector (for DVI, tfp410) */
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index d76dca7..cb00abc 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -410,10 +410,6 @@ static struct regulator_init_data cm_t35_vpll2 = {
|
||||
.consumer_supplies = cm_t35_vdvi_supply,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data cm_t35_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static uint32_t cm_t35_keymap[] = {
|
||||
KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
|
||||
KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
|
||||
@@ -492,12 +488,8 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data cm_t35_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &cm_t35_kp_data,
|
||||
- .usb = &cm_t35_usb_data,
|
||||
.gpio = &cm_t35_gpio_data,
|
||||
.vmmc1 = &cm_t35_vmmc1,
|
||||
.vsim = &cm_t35_vsim,
|
||||
@@ -507,6 +499,7 @@ static struct twl4030_platform_data cm_t35_twldata = {
|
||||
|
||||
static void __init cm_t35_init_i2c(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, 0);
|
||||
omap3_pmic_init("tps65930", &cm_t35_twldata);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
index 949dbea..364942e 100644
|
||||
--- a/arch/arm/mach-omap2/board-devkit8000.c
|
||||
+++ b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
@@ -332,25 +332,9 @@ static struct regulator_init_data devkit8000_vio = {
|
||||
.consumer_supplies = devkit8000_vio_supply,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data devkit8000_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data devkit8000_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data devkit8000_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &devkit8000_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data devkit8000_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .usb = &devkit8000_usb_data,
|
||||
.gpio = &devkit8000_gpio_data,
|
||||
- .codec = &devkit8000_codec_data,
|
||||
.vmmc1 = &devkit8000_vmmc1,
|
||||
.vdac = &devkit8000_vdac,
|
||||
.vpll1 = &devkit8000_vpll1,
|
||||
@@ -360,6 +344,8 @@ static struct twl4030_platform_data devkit8000_twldata = {
|
||||
|
||||
static int __init devkit8000_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&devkit8000_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("tps65930", &devkit8000_twldata);
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
|
||||
index f683835..e0a6687 100644
|
||||
--- a/arch/arm/mach-omap2/board-igep0020.c
|
||||
+++ b/arch/arm/mach-omap2/board-igep0020.c
|
||||
@@ -443,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
|
||||
.setup = igep_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data igep_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static int igep2_enable_dvi(struct omap_dss_device *dssdev)
|
||||
{
|
||||
gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
|
||||
@@ -522,13 +518,6 @@ static void __init igep_init_early(void)
|
||||
m65kxxxxam_sdrc_params);
|
||||
}
|
||||
|
||||
-static struct twl4030_codec_audio_data igep2_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data igep2_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &igep2_audio_data,
|
||||
-};
|
||||
-
|
||||
static int igep2_keymap[] = {
|
||||
KEY(0, 0, KEY_LEFT),
|
||||
KEY(0, 1, KEY_RIGHT),
|
||||
@@ -561,11 +550,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data igep_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .usb = &igep_usb_data,
|
||||
.gpio = &igep_twl4030_gpio_pdata,
|
||||
.vmmc1 = &igep_vmmc1,
|
||||
.vio = &igep_vio,
|
||||
@@ -581,6 +566,8 @@ static void __init igep_i2c_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0);
|
||||
+
|
||||
if (machine_is_igep0020()) {
|
||||
/*
|
||||
* Bus 3 is attached to the DVI port where devices like the
|
||||
@@ -591,9 +578,10 @@ static void __init igep_i2c_init(void)
|
||||
if (ret)
|
||||
pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
|
||||
|
||||
- igep_twldata.codec = &igep2_codec_data;
|
||||
igep_twldata.keypad = &igep2_keypad_pdata;
|
||||
igep_twldata.vpll2 = &igep2_vpll2;
|
||||
+ /* Use common codec data */
|
||||
+ omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0);
|
||||
}
|
||||
|
||||
omap3_pmic_init("twl4030", &igep_twldata);
|
||||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
|
||||
index 5d4328f..218764c 100644
|
||||
--- a/arch/arm/mach-omap2/board-ldp.c
|
||||
+++ b/arch/arm/mach-omap2/board-ldp.c
|
||||
@@ -199,20 +199,12 @@ static void __init omap_ldp_init_early(void)
|
||||
omap2_init_common_devices(NULL, NULL);
|
||||
}
|
||||
|
||||
-static struct twl4030_usb_data ldp_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_gpio_platform_data ldp_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
.irq_end = TWL4030_GPIO_IRQ_END,
|
||||
};
|
||||
|
||||
-static struct twl4030_madc_platform_data ldp_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
};
|
||||
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = {
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data ldp_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .madc = &ldp_madc_data,
|
||||
- .usb = &ldp_usb_data,
|
||||
.vmmc1 = &ldp_vmmc1,
|
||||
.vaux1 = &ldp_vaux1,
|
||||
.gpio = &ldp_gpio_data,
|
||||
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = {
|
||||
|
||||
static int __init omap_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&ldp_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
|
||||
omap3_pmic_init("twl4030", &ldp_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index 2d8dfb3..ec61e9c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -380,25 +380,9 @@ static struct regulator_init_data beagle_vpll2 = {
|
||||
.consumer_supplies = beagle_vdvi_supplies,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data beagle_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data beagle_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data beagle_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &beagle_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data beagle_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .usb = &beagle_usb_data,
|
||||
.gpio = &beagle_gpio_data,
|
||||
- .codec = &beagle_codec_data,
|
||||
.vmmc1 = &beagle_vmmc1,
|
||||
.vsim = &beagle_vsim,
|
||||
.vdac = &beagle_vdac,
|
||||
@@ -413,6 +397,8 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&beagle_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("twl4030", &beagle_twldata);
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index 57bce0f..1ca298a 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -396,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
|
||||
.setup = omap3evm_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data omap3evm_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static uint32_t board_keymap[] = {
|
||||
KEY(0, 0, KEY_LEFT),
|
||||
KEY(0, 1, KEY_DOWN),
|
||||
@@ -434,17 +430,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
-static struct twl4030_madc_platform_data omap3evm_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data omap3evm_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data omap3evm_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &omap3evm_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = {
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
};
|
||||
@@ -547,15 +532,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
|
||||
#endif
|
||||
|
||||
static struct twl4030_platform_data omap3evm_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &omap3evm_kp_data,
|
||||
- .madc = &omap3evm_madc_data,
|
||||
- .usb = &omap3evm_usb_data,
|
||||
.gpio = &omap3evm_gpio_data,
|
||||
- .codec = &omap3evm_codec_data,
|
||||
.vdac = &omap3_evm_vdac,
|
||||
.vpll2 = &omap3_evm_vpll2,
|
||||
.vio = &omap3evm_vio,
|
||||
@@ -565,6 +544,9 @@ static struct twl4030_platform_data omap3evm_twldata = {
|
||||
|
||||
static int __init omap3_evm_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&omap3evm_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
|
||||
+ TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("twl4030", &omap3evm_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
index d4ea940..f5abf76 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
@@ -508,25 +508,10 @@ static struct platform_device pandora_vwlan_device = {
|
||||
},
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data omap3pandora_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data omap3pandora_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data omap3pandora_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &omap3pandora_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_bci_platform_data pandora_bci_data;
|
||||
|
||||
static struct twl4030_platform_data omap3pandora_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
.gpio = &omap3pandora_gpio_data,
|
||||
- .usb = &omap3pandora_usb_data,
|
||||
- .codec = &omap3pandora_codec_data,
|
||||
.vmmc1 = &pandora_vmmc1,
|
||||
.vmmc2 = &pandora_vmmc2,
|
||||
.vdac = &pandora_vdac,
|
||||
@@ -548,6 +533,8 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
|
||||
|
||||
static int __init omap3pandora_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&omap3pandora_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("tps65950", &omap3pandora_twldata);
|
||||
/* i2c2 pins are not connected */
|
||||
omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index b8ad4dd..6e59e59 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -349,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
|
||||
.setup = omap3stalker_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data omap3stalker_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static uint32_t board_keymap[] = {
|
||||
KEY(0, 0, KEY_LEFT),
|
||||
KEY(0, 1, KEY_DOWN),
|
||||
@@ -387,17 +383,6 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
-static struct twl4030_madc_platform_data omap3stalker_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data omap3stalker_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data omap3stalker_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &omap3stalker_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = {
|
||||
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
};
|
||||
@@ -439,15 +424,9 @@ static struct regulator_init_data omap3_stalker_vpll2 = {
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data omap3stalker_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &omap3stalker_kp_data,
|
||||
- .madc = &omap3stalker_madc_data,
|
||||
- .usb = &omap3stalker_usb_data,
|
||||
.gpio = &omap3stalker_gpio_data,
|
||||
- .codec = &omap3stalker_codec_data,
|
||||
.vdac = &omap3_stalker_vdac,
|
||||
.vpll2 = &omap3_stalker_vpll2,
|
||||
.vmmc1 = &omap3stalker_vmmc1,
|
||||
@@ -470,6 +449,9 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
|
||||
|
||||
static int __init omap3_stalker_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&omap3stalker_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
|
||||
+ TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("twl4030", &omap3stalker_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index 57e6ed3..717972c 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -235,25 +235,9 @@ static struct regulator_init_data touchbook_vpll2 = {
|
||||
.consumer_supplies = touchbook_vdvi_supply,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data touchbook_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data touchbook_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data touchbook_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &touchbook_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data touchbook_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .usb = &touchbook_usb_data,
|
||||
.gpio = &touchbook_gpio_data,
|
||||
- .codec = &touchbook_codec_data,
|
||||
.vmmc1 = &touchbook_vmmc1,
|
||||
.vsim = &touchbook_vsim,
|
||||
.vdac = &touchbook_vdac,
|
||||
@@ -269,8 +253,9 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
|
||||
static int __init omap3_touchbook_i2c_init(void)
|
||||
{
|
||||
/* Standard TouchBook bus */
|
||||
+ omap3_pmic_get_config(&touchbook_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("twl4030", &touchbook_twldata);
|
||||
-
|
||||
/* Additional TouchBook bus */
|
||||
omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
|
||||
ARRAY_SIZE(touchBook_i2c_boardinfo));
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 1bf2f39..776b444 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -433,10 +433,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = {
|
||||
.setup = overo_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data overo_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static struct regulator_init_data overo_vmmc1 = {
|
||||
.constraints = {
|
||||
.min_uV = 1850000,
|
||||
@@ -480,19 +476,8 @@ static struct regulator_init_data overo_vpll2 = {
|
||||
.consumer_supplies = overo_vdds_dsi_supply,
|
||||
};
|
||||
|
||||
-static struct twl4030_codec_audio_data overo_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data overo_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &overo_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data overo_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
.gpio = &overo_gpio_data,
|
||||
- .usb = &overo_usb_data,
|
||||
- .codec = &overo_codec_data,
|
||||
.vmmc1 = &overo_vmmc1,
|
||||
.vdac = &overo_vdac,
|
||||
.vpll2 = &overo_vpll2,
|
||||
@@ -500,6 +485,8 @@ static struct twl4030_platform_data overo_twldata = {
|
||||
|
||||
static int __init overo_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&overo_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
omap3_pmic_init("tps65950", &overo_twldata);
|
||||
/* i2c2 pins are used for gpio */
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
|
||||
index 54dceb1..7dfed24 100644
|
||||
--- a/arch/arm/mach-omap2/board-rm680.c
|
||||
+++ b/arch/arm/mach-omap2/board-rm680.c
|
||||
@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = {
|
||||
.pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15),
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data rm680_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data rm680_twl_data = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
.gpio = &rm680_gpio_data,
|
||||
- .usb = &rm680_usb_data,
|
||||
/* add rest of the children here */
|
||||
};
|
||||
|
||||
static void __init rm680_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
|
||||
omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
index b633ba8..3cdea39 100644
|
||||
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
@@ -288,10 +288,6 @@ static struct twl4030_keypad_data rx51_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
-static struct twl4030_madc_platform_data rx51_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
/* Enable input logic and pull all lines up when eMMC is on. */
|
||||
static struct omap_board_mux rx51_mmc2_on_mux[] = {
|
||||
OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
|
||||
@@ -603,10 +599,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = {
|
||||
.setup = rx51_twlgpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_usb_data rx51_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_ins sleep_on_seq[] __initdata = {
|
||||
/*
|
||||
* Turn off everything
|
||||
@@ -778,14 +770,9 @@ struct twl4030_codec_data rx51_codec_data __initdata = {
|
||||
};
|
||||
|
||||
static struct twl4030_platform_data rx51_twldata __initdata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
.gpio = &rx51_gpio_data,
|
||||
.keypad = &rx51_kp_data,
|
||||
- .madc = &rx51_madc_data,
|
||||
- .usb = &rx51_usb_data,
|
||||
.power = &rx51_t2scripts_data,
|
||||
.codec = &rx51_codec_data,
|
||||
|
||||
@@ -850,6 +837,8 @@ static int __init rx51_i2c_init(void)
|
||||
rx51_twldata.vaux3 = &rx51_vaux3_cam;
|
||||
}
|
||||
rx51_twldata.vmmc2 = &rx51_vmmc2;
|
||||
+ omap3_pmic_get_config(&rx51_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
|
||||
omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
|
||||
omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
|
||||
ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
index 8495f82..6d8df1b 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
@@ -285,26 +285,6 @@ static void zoom2_set_hs_extmute(int mute)
|
||||
gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
|
||||
}
|
||||
|
||||
-static int zoom_batt_table[] = {
|
||||
-/* 0 C*/
|
||||
-30800, 29500, 28300, 27100,
|
||||
-26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
|
||||
-17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
|
||||
-11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
|
||||
-8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
|
||||
-5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
|
||||
-4040, 3910, 3790, 3670, 3550
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_bci_platform_data zoom_bci_data = {
|
||||
- .battery_tmp_tbl = zoom_batt_table,
|
||||
- .tblsize = ARRAY_SIZE(zoom_batt_table),
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_usb_data zoom_usb_data = {
|
||||
- .usb_mode = T2_USB_MODE_ULPI,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_gpio_platform_data zoom_gpio_data = {
|
||||
.gpio_base = OMAP_MAX_GPIO_LINES,
|
||||
.irq_base = TWL4030_GPIO_IRQ_BASE,
|
||||
@@ -312,28 +292,10 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = {
|
||||
.setup = zoom_twl_gpio_setup,
|
||||
};
|
||||
|
||||
-static struct twl4030_madc_platform_data zoom_madc_data = {
|
||||
- .irq_line = 1,
|
||||
-};
|
||||
-
|
||||
-static struct twl4030_codec_audio_data zoom_audio_data;
|
||||
-
|
||||
-static struct twl4030_codec_data zoom_codec_data = {
|
||||
- .audio_mclk = 26000000,
|
||||
- .audio = &zoom_audio_data,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data zoom_twldata = {
|
||||
- .irq_base = TWL4030_IRQ_BASE,
|
||||
- .irq_end = TWL4030_IRQ_END,
|
||||
-
|
||||
/* platform_data for children goes here */
|
||||
- .bci = &zoom_bci_data,
|
||||
- .madc = &zoom_madc_data,
|
||||
- .usb = &zoom_usb_data,
|
||||
.gpio = &zoom_gpio_data,
|
||||
.keypad = &zoom_kp_twl4030_data,
|
||||
- .codec = &zoom_codec_data,
|
||||
.vmmc1 = &zoom_vmmc1,
|
||||
.vmmc2 = &zoom_vmmc2,
|
||||
.vsim = &zoom_vsim,
|
||||
@@ -343,10 +305,17 @@ static struct twl4030_platform_data zoom_twldata = {
|
||||
|
||||
static int __init omap_i2c_init(void)
|
||||
{
|
||||
+ omap3_pmic_get_config(&zoom_twldata,
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
+ TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+
|
||||
if (machine_is_omap_zoom2()) {
|
||||
- zoom_audio_data.ramp_delay_value = 3; /* 161 ms */
|
||||
- zoom_audio_data.hs_extmute = 1;
|
||||
- zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
|
||||
+ struct twl4030_codec_audio_data *audio_data;
|
||||
+ audio_data = zoom_twldata.codec->audio;
|
||||
+
|
||||
+ audio_data->ramp_delay_value = 3; /* 161 ms */
|
||||
+ audio_data->hs_extmute = 1;
|
||||
+ audio_data->set_hs_extmute = zoom2_set_hs_extmute;
|
||||
}
|
||||
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
|
||||
index cf80f4c..9e8decf 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.c
|
||||
+++ b/arch/arm/mach-omap2/twl-common.c
|
||||
@@ -56,6 +56,37 @@ static struct twl4030_usb_data omap4_usb_pdata = {
|
||||
.phy_suspend = omap4430_phy_suspend,
|
||||
};
|
||||
|
||||
+static struct twl4030_usb_data omap3_usb_pdata = {
|
||||
+ .usb_mode = T2_USB_MODE_ULPI,
|
||||
+};
|
||||
+
|
||||
+static int omap3_batt_table[] = {
|
||||
+/* 0 C */
|
||||
+30800, 29500, 28300, 27100,
|
||||
+26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
|
||||
+17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
|
||||
+11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
|
||||
+8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
|
||||
+5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
|
||||
+4040, 3910, 3790, 3670, 3550
|
||||
+};
|
||||
+
|
||||
+static struct twl4030_bci_platform_data omap3_bci_pdata = {
|
||||
+ .battery_tmp_tbl = omap3_batt_table,
|
||||
+ .tblsize = ARRAY_SIZE(omap3_batt_table),
|
||||
+};
|
||||
+
|
||||
+static struct twl4030_madc_platform_data omap3_madc_pdata = {
|
||||
+ .irq_line = 1,
|
||||
+};
|
||||
+
|
||||
+static struct twl4030_codec_audio_data omap3_audio;
|
||||
+
|
||||
+static struct twl4030_codec_data omap3_codec_pdata = {
|
||||
+ .audio_mclk = 26000000,
|
||||
+ .audio = &omap3_audio,
|
||||
+};
|
||||
+
|
||||
static struct regulator_init_data omap4_vdac_idata = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
@@ -207,3 +238,25 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
!pmic_data->clk32kg)
|
||||
pmic_data->clk32kg = &omap4_clk32kg_idata;
|
||||
}
|
||||
+
|
||||
+void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
+ u32 pdata_flags, u32 regulators_flags)
|
||||
+{
|
||||
+ if (!pmic_data->irq_base)
|
||||
+ pmic_data->irq_base = TWL4030_IRQ_BASE;
|
||||
+ if (!pmic_data->irq_end)
|
||||
+ pmic_data->irq_end = TWL4030_IRQ_END;
|
||||
+
|
||||
+ /* Common platform data configurations */
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
|
||||
+ pmic_data->usb = &omap3_usb_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
|
||||
+ pmic_data->bci = &omap3_bci_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
|
||||
+ pmic_data->madc = &omap3_madc_pdata;
|
||||
+
|
||||
+ if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
|
||||
+ pmic_data->codec = &omap3_codec_pdata;
|
||||
+}
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
|
||||
index d96c289..3b4b05d 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.h
|
||||
+++ b/arch/arm/mach-omap2/twl-common.h
|
||||
@@ -2,6 +2,9 @@
|
||||
#define __OMAP_PMIC_COMMON__
|
||||
|
||||
#define TWL_COMMON_PDATA_USB (1 << 0)
|
||||
+#define TWL_COMMON_PDATA_BCI (1 << 1)
|
||||
+#define TWL_COMMON_PDATA_MADC (1 << 2)
|
||||
+#define TWL_COMMON_PDATA_AUDIO (1 << 3)
|
||||
|
||||
/* Common LDO regulators for TWL4030/TWL6030 */
|
||||
#define TWL_COMMON_REGULATOR_VDAC (1 << 0)
|
||||
@@ -42,6 +45,9 @@ static inline void omap4_pmic_init(const char *pmic_type,
|
||||
omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
|
||||
}
|
||||
|
||||
+void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
+ u32 pdata_flags, u32 regulators_flags);
|
||||
+
|
||||
void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
u32 pdata_flags, u32 regulators_flags);
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-924
@@ -1,924 +0,0 @@
|
||||
From df02a0c8e1d42d1f861d138d1283172872c602ed Mon Sep 17 00:00:00 2001
|
||||
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Date: Tue, 7 Jun 2011 11:38:24 +0300
|
||||
Subject: [PATCH 025/149] OMAP3: Move common regulator configuration to twl-common
|
||||
|
||||
Some regulator config can be moved out from board files,
|
||||
since they are close to identical.
|
||||
|
||||
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
Acked-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap2/board-3430sdp.c | 51 ++++----------------------
|
||||
arch/arm/mach-omap2/board-cm-t35.c | 44 ++++------------------
|
||||
arch/arm/mach-omap2/board-devkit8000.c | 22 +----------
|
||||
arch/arm/mach-omap2/board-igep0020.c | 28 +++------------
|
||||
arch/arm/mach-omap2/board-omap3beagle.c | 46 +++---------------------
|
||||
arch/arm/mach-omap2/board-omap3evm.c | 50 ++++----------------------
|
||||
arch/arm/mach-omap2/board-omap3pandora.c | 47 +++++-------------------
|
||||
arch/arm/mach-omap2/board-omap3stalker.c | 50 ++++----------------------
|
||||
arch/arm/mach-omap2/board-omap3touchbook.c | 44 ++++++----------------
|
||||
arch/arm/mach-omap2/board-overo.c | 46 +++---------------------
|
||||
arch/arm/mach-omap2/board-rx51-peripherals.c | 27 +++-----------
|
||||
arch/arm/mach-omap2/board-zoom-peripherals.c | 42 ++--------------------
|
||||
arch/arm/mach-omap2/twl-common.c | 42 +++++++++++++++++++++
|
||||
arch/arm/mach-omap2/twl-common.h | 5 +++
|
||||
14 files changed, 124 insertions(+), 420 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
index 8bbd4e0..bd600cf 100644
|
||||
--- a/arch/arm/mach-omap2/board-3430sdp.c
|
||||
+++ b/arch/arm/mach-omap2/board-3430sdp.c
|
||||
@@ -283,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
|
||||
REGULATOR_SUPPLY("vcc", "spi1.0"),
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
|
||||
};
|
||||
@@ -409,36 +399,6 @@ static struct regulator_init_data sdp3430_vsim = {
|
||||
.consumer_supplies = sdp3430_vsim_supplies,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video */
|
||||
-static struct regulator_init_data sdp3430_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
|
||||
- .consumer_supplies = sdp3430_vdda_dac_supplies,
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data sdp3430_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),
|
||||
- .consumer_supplies = sdp3430_vpll2_supplies,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data sdp3430_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.gpio = &sdp3430_gpio_data,
|
||||
@@ -451,16 +411,19 @@ static struct twl4030_platform_data sdp3430_twldata = {
|
||||
.vmmc1 = &sdp3430_vmmc1,
|
||||
.vmmc2 = &sdp3430_vmmc2,
|
||||
.vsim = &sdp3430_vsim,
|
||||
- .vdac = &sdp3430_vdac,
|
||||
- .vpll2 = &sdp3430_vpll2,
|
||||
};
|
||||
|
||||
static int __init omap3430_i2c_init(void)
|
||||
{
|
||||
/* i2c1 for PMIC only */
|
||||
omap3_pmic_get_config(&sdp3430_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
- TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
+ TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+ sdp3430_twldata.vdac->constraints.apply_uV = true;
|
||||
+ sdp3430_twldata.vpll2->constraints.apply_uV = true;
|
||||
+ sdp3430_twldata.vpll2->constraints.name = "VDVI";
|
||||
+
|
||||
omap3_pmic_init("twl4030", &sdp3430_twldata);
|
||||
|
||||
/* i2c2 on camera connector (for sensor control) and optional isp1301 */
|
||||
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
index cb00abc..35891d4 100644
|
||||
--- a/arch/arm/mach-omap2/board-cm-t35.c
|
||||
+++ b/arch/arm/mach-omap2/board-cm-t35.c
|
||||
@@ -343,10 +343,6 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply cm_t35_vdac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
|
||||
REGULATOR_SUPPLY("vdvi", "omapdss"),
|
||||
};
|
||||
@@ -381,35 +377,6 @@ static struct regulator_init_data cm_t35_vsim = {
|
||||
.consumer_supplies = cm_t35_vsim_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
-static struct regulator_init_data cm_t35_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdac_supply),
|
||||
- .consumer_supplies = cm_t35_vdac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_init_data cm_t35_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(cm_t35_vdvi_supply),
|
||||
- .consumer_supplies = cm_t35_vdvi_supply,
|
||||
-};
|
||||
-
|
||||
static uint32_t cm_t35_keymap[] = {
|
||||
KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
|
||||
KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
|
||||
@@ -493,13 +460,18 @@ static struct twl4030_platform_data cm_t35_twldata = {
|
||||
.gpio = &cm_t35_gpio_data,
|
||||
.vmmc1 = &cm_t35_vmmc1,
|
||||
.vsim = &cm_t35_vsim,
|
||||
- .vdac = &cm_t35_vdac,
|
||||
- .vpll2 = &cm_t35_vpll2,
|
||||
};
|
||||
|
||||
static void __init cm_t35_init_i2c(void)
|
||||
{
|
||||
- omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, 0);
|
||||
+ omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ cm_t35_twldata.vpll2->constraints.name = "VDVI";
|
||||
+ cm_t35_twldata.vpll2->num_consumer_supplies =
|
||||
+ ARRAY_SIZE(cm_t35_vdvi_supply);
|
||||
+ cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
|
||||
+
|
||||
omap3_pmic_init("tps65930", &cm_t35_twldata);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
index 364942e..b6002ec 100644
|
||||
--- a/arch/arm/mach-omap2/board-devkit8000.c
|
||||
+++ b/arch/arm/mach-omap2/board-devkit8000.c
|
||||
@@ -186,10 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
|
||||
.default_device = &devkit8000_lcd_device,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply devkit8000_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
static uint32_t board_keymap[] = {
|
||||
KEY(0, 0, KEY_1),
|
||||
KEY(1, 0, KEY_2),
|
||||
@@ -289,20 +285,6 @@ static struct regulator_init_data devkit8000_vmmc1 = {
|
||||
.consumer_supplies = devkit8000_vmmc1_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
-static struct regulator_init_data devkit8000_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(devkit8000_vdda_dac_supply),
|
||||
- .consumer_supplies = devkit8000_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
/* VPLL1 for digital video outputs */
|
||||
static struct regulator_init_data devkit8000_vpll1 = {
|
||||
.constraints = {
|
||||
@@ -336,7 +318,6 @@ static struct twl4030_platform_data devkit8000_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.gpio = &devkit8000_gpio_data,
|
||||
.vmmc1 = &devkit8000_vmmc1,
|
||||
- .vdac = &devkit8000_vdac,
|
||||
.vpll1 = &devkit8000_vpll1,
|
||||
.vio = &devkit8000_vio,
|
||||
.keypad = &devkit8000_kp_data,
|
||||
@@ -345,7 +326,8 @@ static struct twl4030_platform_data devkit8000_twldata = {
|
||||
static int __init devkit8000_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&devkit8000_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC);
|
||||
omap3_pmic_init("tps65930", &devkit8000_twldata);
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
|
||||
index e0a6687..35be778 100644
|
||||
--- a/arch/arm/mach-omap2/board-igep0020.c
|
||||
+++ b/arch/arm/mach-omap2/board-igep0020.c
|
||||
@@ -479,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = {
|
||||
.default_device = &igep2_dvi_device,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data igep2_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies),
|
||||
- .consumer_supplies = igep2_vpll2_supplies,
|
||||
-};
|
||||
-
|
||||
static void __init igep2_display_init(void)
|
||||
{
|
||||
int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
|
||||
@@ -579,9 +559,11 @@ static void __init igep_i2c_init(void)
|
||||
pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
|
||||
|
||||
igep_twldata.keypad = &igep2_keypad_pdata;
|
||||
- igep_twldata.vpll2 = &igep2_vpll2;
|
||||
- /* Use common codec data */
|
||||
- omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ /* Get common pmic data */
|
||||
+ omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VPLL2);
|
||||
+ igep_twldata.vpll2->constraints.apply_uV = true;
|
||||
+ igep_twldata.vpll2->constraints.name = "VDVI";
|
||||
}
|
||||
|
||||
omap3_pmic_init("twl4030", &igep_twldata);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
index ec61e9c..34f8411 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
|
||||
@@ -209,15 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = {
|
||||
.default_device = &beagle_dvi_device,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply beagle_vdac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
static void __init beagle_display_init(void)
|
||||
{
|
||||
int r;
|
||||
@@ -351,42 +342,11 @@ static struct regulator_init_data beagle_vsim = {
|
||||
.consumer_supplies = beagle_vsim_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
-static struct regulator_init_data beagle_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(beagle_vdac_supply),
|
||||
- .consumer_supplies = beagle_vdac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_init_data beagle_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
|
||||
- .consumer_supplies = beagle_vdvi_supplies,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data beagle_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.gpio = &beagle_gpio_data,
|
||||
.vmmc1 = &beagle_vmmc1,
|
||||
.vsim = &beagle_vsim,
|
||||
- .vdac = &beagle_vdac,
|
||||
- .vpll2 = &beagle_vpll2,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
@@ -398,7 +358,11 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
|
||||
static int __init omap3_beagle_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&beagle_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ beagle_twldata.vpll2->constraints.name = "VDVI";
|
||||
+
|
||||
omap3_pmic_init("twl4030", &beagle_twldata);
|
||||
/* Bus 3 is attached to the DVI port where devices like the pico DLP
|
||||
* projector don't work reliably with 400kHz */
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
index 1ca298a..c452b3f 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3evm.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3evm.c
|
||||
@@ -430,45 +430,6 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply omap3_evm_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-/* VDAC for DSS driving S-Video */
|
||||
-static struct regulator_init_data omap3_evm_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vdda_dac_supply),
|
||||
- .consumer_supplies = omap3_evm_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap3_evm_vpll2 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies),
|
||||
- .consumer_supplies = omap3_evm_vpll2_supplies,
|
||||
-};
|
||||
-
|
||||
/* ads7846 on SPI */
|
||||
static struct regulator_consumer_supply omap3evm_vio_supply[] = {
|
||||
REGULATOR_SUPPLY("vcc", "spi1.0"),
|
||||
@@ -535,8 +496,6 @@ static struct twl4030_platform_data omap3evm_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &omap3evm_kp_data,
|
||||
.gpio = &omap3evm_gpio_data,
|
||||
- .vdac = &omap3_evm_vdac,
|
||||
- .vpll2 = &omap3_evm_vpll2,
|
||||
.vio = &omap3evm_vio,
|
||||
.vmmc1 = &omap3evm_vmmc1,
|
||||
.vsim = &omap3evm_vsim,
|
||||
@@ -545,8 +504,13 @@ static struct twl4030_platform_data omap3evm_twldata = {
|
||||
static int __init omap3_evm_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&omap3evm_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
|
||||
- TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
|
||||
+ TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ omap3evm_twldata.vdac->constraints.apply_uV = true;
|
||||
+ omap3evm_twldata.vpll2->constraints.apply_uV = true;
|
||||
+
|
||||
omap3_pmic_init("twl4030", &omap3evm_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
index f5abf76..080d7bd 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
|
||||
@@ -332,10 +332,6 @@ static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply pandora_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
static struct regulator_consumer_supply pandora_vdds_supplies[] = {
|
||||
REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
|
||||
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
@@ -391,36 +387,6 @@ static struct regulator_init_data pandora_vmmc2 = {
|
||||
.consumer_supplies = pandora_vmmc2_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video */
|
||||
-static struct regulator_init_data pandora_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(pandora_vdda_dac_supply),
|
||||
- .consumer_supplies = pandora_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_init_data pandora_vpll2 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies),
|
||||
- .consumer_supplies = pandora_vdds_supplies,
|
||||
-};
|
||||
-
|
||||
/* VAUX1 for LCD */
|
||||
static struct regulator_init_data pandora_vaux1 = {
|
||||
.constraints = {
|
||||
@@ -514,8 +480,6 @@ static struct twl4030_platform_data omap3pandora_twldata = {
|
||||
.gpio = &omap3pandora_gpio_data,
|
||||
.vmmc1 = &pandora_vmmc1,
|
||||
.vmmc2 = &pandora_vmmc2,
|
||||
- .vdac = &pandora_vdac,
|
||||
- .vpll2 = &pandora_vpll2,
|
||||
.vaux1 = &pandora_vaux1,
|
||||
.vaux2 = &pandora_vaux2,
|
||||
.vaux4 = &pandora_vaux4,
|
||||
@@ -534,7 +498,16 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
|
||||
static int __init omap3pandora_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&omap3pandora_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ omap3pandora_twldata.vdac->constraints.apply_uV = true;
|
||||
+
|
||||
+ omap3pandora_twldata.vpll2->constraints.apply_uV = true;
|
||||
+ omap3pandora_twldata.vpll2->num_consumer_supplies =
|
||||
+ ARRAY_SIZE(pandora_vdds_supplies);
|
||||
+ omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies;
|
||||
+
|
||||
omap3_pmic_init("tps65950", &omap3pandora_twldata);
|
||||
/* i2c2 pins are not connected */
|
||||
omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
index 6e59e59..8e10498 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
|
||||
@@ -383,52 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
|
||||
.rep = 1,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-/* VDAC for DSS driving S-Video */
|
||||
-static struct regulator_init_data omap3_stalker_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vdda_dac_supply),
|
||||
- .consumer_supplies = omap3_stalker_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data omap3_stalker_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
|
||||
- .consumer_supplies = omap3_stalker_vpll2_supplies,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data omap3stalker_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.keypad = &omap3stalker_kp_data,
|
||||
.gpio = &omap3stalker_gpio_data,
|
||||
- .vdac = &omap3_stalker_vdac,
|
||||
- .vpll2 = &omap3_stalker_vpll2,
|
||||
.vmmc1 = &omap3stalker_vmmc1,
|
||||
.vsim = &omap3stalker_vsim,
|
||||
};
|
||||
@@ -451,7 +409,13 @@ static int __init omap3_stalker_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&omap3stalker_twldata,
|
||||
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
|
||||
- TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ omap3stalker_twldata.vdac->constraints.apply_uV = true;
|
||||
+ omap3stalker_twldata.vpll2->constraints.apply_uV = true;
|
||||
+ omap3stalker_twldata.vpll2->constraints.name = "VDVI";
|
||||
+
|
||||
omap3_pmic_init("twl4030", &omap3stalker_twldata);
|
||||
omap_register_i2c_bus(2, 400, NULL, 0);
|
||||
omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
|
||||
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
index 717972c..852ea04 100644
|
||||
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
|
||||
@@ -206,42 +206,11 @@ static struct regulator_init_data touchbook_vsim = {
|
||||
.consumer_supplies = touchbook_vsim_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
-static struct regulator_init_data touchbook_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(touchbook_vdac_supply),
|
||||
- .consumer_supplies = touchbook_vdac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_init_data touchbook_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(touchbook_vdvi_supply),
|
||||
- .consumer_supplies = touchbook_vdvi_supply,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data touchbook_twldata = {
|
||||
/* platform_data for children goes here */
|
||||
.gpio = &touchbook_gpio_data,
|
||||
.vmmc1 = &touchbook_vmmc1,
|
||||
.vsim = &touchbook_vsim,
|
||||
- .vdac = &touchbook_vdac,
|
||||
- .vpll2 = &touchbook_vpll2,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
|
||||
@@ -254,7 +223,18 @@ static int __init omap3_touchbook_i2c_init(void)
|
||||
{
|
||||
/* Standard TouchBook bus */
|
||||
omap3_pmic_get_config(&touchbook_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ touchbook_twldata.vdac->num_consumer_supplies =
|
||||
+ ARRAY_SIZE(touchbook_vdac_supply);
|
||||
+ touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
|
||||
+
|
||||
+ touchbook_twldata.vpll2->constraints.name = "VDVI";
|
||||
+ touchbook_twldata.vpll2->num_consumer_supplies =
|
||||
+ ARRAY_SIZE(touchbook_vdvi_supply);
|
||||
+ touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
|
||||
+
|
||||
omap3_pmic_init("twl4030", &touchbook_twldata);
|
||||
/* Additional TouchBook bus */
|
||||
omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
|
||||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
|
||||
index 776b444..f1f18d0 100644
|
||||
--- a/arch/arm/mach-omap2/board-overo.c
|
||||
+++ b/arch/arm/mach-omap2/board-overo.c
|
||||
@@ -265,15 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
|
||||
.default_device = &overo_dvi_device,
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply overo_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
static struct mtd_partition overo_nand_partitions[] = {
|
||||
{
|
||||
.name = "xloader",
|
||||
@@ -447,46 +438,19 @@ static struct regulator_init_data overo_vmmc1 = {
|
||||
.consumer_supplies = overo_vmmc1_supply,
|
||||
};
|
||||
|
||||
-/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
|
||||
-static struct regulator_init_data overo_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(overo_vdda_dac_supply),
|
||||
- .consumer_supplies = overo_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
-/* VPLL2 for digital video outputs */
|
||||
-static struct regulator_init_data overo_vpll2 = {
|
||||
- .constraints = {
|
||||
- .name = "VDVI",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
|
||||
- .consumer_supplies = overo_vdds_dsi_supply,
|
||||
-};
|
||||
-
|
||||
static struct twl4030_platform_data overo_twldata = {
|
||||
.gpio = &overo_gpio_data,
|
||||
.vmmc1 = &overo_vmmc1,
|
||||
- .vdac = &overo_vdac,
|
||||
- .vpll2 = &overo_vpll2,
|
||||
};
|
||||
|
||||
static int __init overo_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&overo_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
+
|
||||
+ overo_twldata.vpll2->constraints.name = "VDVI";
|
||||
+
|
||||
omap3_pmic_init("tps65950", &overo_twldata);
|
||||
/* i2c2 pins are used for gpio */
|
||||
omap_register_i2c_bus(3, 400, NULL, 0);
|
||||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
index 3cdea39..d99e462 100644
|
||||
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
|
||||
@@ -394,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
|
||||
REGULATOR_SUPPLY("vdd", "2-0063"),
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply rx51_vdac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
static struct regulator_init_data rx51_vaux1 = {
|
||||
.constraints = {
|
||||
.name = "V28",
|
||||
@@ -514,21 +510,6 @@ static struct regulator_init_data rx51_vsim = {
|
||||
.consumer_supplies = rx51_vsim_supply,
|
||||
};
|
||||
|
||||
-static struct regulator_init_data rx51_vdac = {
|
||||
- .constraints = {
|
||||
- .name = "VDAC",
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .apply_uV = true,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(rx51_vdac_supply),
|
||||
- .consumer_supplies = rx51_vdac_supply,
|
||||
-};
|
||||
-
|
||||
static struct regulator_init_data rx51_vio = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
@@ -781,7 +762,6 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
|
||||
.vaux4 = &rx51_vaux4,
|
||||
.vmmc1 = &rx51_vmmc1,
|
||||
.vsim = &rx51_vsim,
|
||||
- .vdac = &rx51_vdac,
|
||||
.vio = &rx51_vio,
|
||||
};
|
||||
|
||||
@@ -838,7 +818,12 @@ static int __init rx51_i2c_init(void)
|
||||
}
|
||||
rx51_twldata.vmmc2 = &rx51_vmmc2;
|
||||
omap3_pmic_get_config(&rx51_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC,
|
||||
+ TWL_COMMON_REGULATOR_VDAC);
|
||||
+
|
||||
+ rx51_twldata.vdac->constraints.apply_uV = true;
|
||||
+ rx51_twldata.vdac->constraints.name = "VDAC";
|
||||
+
|
||||
omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
|
||||
omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
|
||||
ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
|
||||
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
index 6d8df1b..13a6442 100644
|
||||
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
|
||||
@@ -226,41 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
-static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_consumer_supply zoom_vdda_dac_supply[] = {
|
||||
- REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data zoom_vpll2 = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
|
||||
- .consumer_supplies = zoom_vpll2_supplies,
|
||||
-};
|
||||
-
|
||||
-static struct regulator_init_data zoom_vdac = {
|
||||
- .constraints = {
|
||||
- .min_uV = 1800000,
|
||||
- .max_uV = 1800000,
|
||||
- .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
- | REGULATOR_MODE_STANDBY,
|
||||
- .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
- | REGULATOR_CHANGE_STATUS,
|
||||
- },
|
||||
- .num_consumer_supplies = ARRAY_SIZE(zoom_vdda_dac_supply),
|
||||
- .consumer_supplies = zoom_vdda_dac_supply,
|
||||
-};
|
||||
-
|
||||
static int zoom_twl_gpio_setup(struct device *dev,
|
||||
unsigned gpio, unsigned ngpio)
|
||||
{
|
||||
@@ -299,15 +264,14 @@ static struct twl4030_platform_data zoom_twldata = {
|
||||
.vmmc1 = &zoom_vmmc1,
|
||||
.vmmc2 = &zoom_vmmc2,
|
||||
.vsim = &zoom_vsim,
|
||||
- .vpll2 = &zoom_vpll2,
|
||||
- .vdac = &zoom_vdac,
|
||||
};
|
||||
|
||||
static int __init omap_i2c_init(void)
|
||||
{
|
||||
omap3_pmic_get_config(&zoom_twldata,
|
||||
- TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
- TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, 0);
|
||||
+ TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
|
||||
+ TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
|
||||
+ TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
|
||||
|
||||
if (machine_is_omap_zoom2()) {
|
||||
struct twl4030_codec_audio_data *audio_data;
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
|
||||
index 9e8decf..3aaa46f 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.c
|
||||
+++ b/arch/arm/mach-omap2/twl-common.c
|
||||
@@ -87,6 +87,41 @@ static struct twl4030_codec_data omap3_codec_pdata = {
|
||||
.audio = &omap3_audio,
|
||||
};
|
||||
|
||||
+static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
|
||||
+ REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap3_vdac_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies),
|
||||
+ .consumer_supplies = omap3_vdda_dac_supplies,
|
||||
+};
|
||||
+
|
||||
+static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
|
||||
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
|
||||
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
|
||||
+};
|
||||
+
|
||||
+static struct regulator_init_data omap3_vpll2_idata = {
|
||||
+ .constraints = {
|
||||
+ .min_uV = 1800000,
|
||||
+ .max_uV = 1800000,
|
||||
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
|
||||
+ | REGULATOR_MODE_STANDBY,
|
||||
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
|
||||
+ | REGULATOR_CHANGE_STATUS,
|
||||
+ },
|
||||
+ .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies),
|
||||
+ .consumer_supplies = omap3_vpll2_supplies,
|
||||
+};
|
||||
+
|
||||
static struct regulator_init_data omap4_vdac_idata = {
|
||||
.constraints = {
|
||||
.min_uV = 1800000,
|
||||
@@ -259,4 +294,11 @@ void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
|
||||
|
||||
if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->codec)
|
||||
pmic_data->codec = &omap3_codec_pdata;
|
||||
+
|
||||
+ /* Common regulator configurations */
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
|
||||
+ pmic_data->vdac = &omap3_vdac_idata;
|
||||
+
|
||||
+ if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
|
||||
+ pmic_data->vpll2 = &omap3_vpll2_idata;
|
||||
}
|
||||
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
|
||||
index 3b4b05d..5e83a5b 100644
|
||||
--- a/arch/arm/mach-omap2/twl-common.h
|
||||
+++ b/arch/arm/mach-omap2/twl-common.h
|
||||
@@ -21,6 +21,11 @@
|
||||
#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
|
||||
#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
|
||||
|
||||
+/* TWL4030 LDO regulators */
|
||||
+#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)
|
||||
+#define TWL_COMMON_REGULATOR_VPLL2 (1 << 5)
|
||||
+
|
||||
+
|
||||
struct twl4030_platform_data;
|
||||
|
||||
void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
From 7a7bf2e165760ed106b0f4c8beb7191e3abe944f Mon Sep 17 00:00:00 2001
|
||||
From: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Date: Fri, 1 Jul 2011 08:52:26 +0000
|
||||
Subject: [PATCH 026/149] omap: mcbsp: Remove rx_/tx_word_length variables
|
||||
|
||||
These variables got unused after ("omap: mcbsp: Drop in-driver transfer
|
||||
support") but was noticed only afterwards.
|
||||
|
||||
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/plat-omap/include/plat/mcbsp.h | 2 --
|
||||
arch/arm/plat-omap/mcbsp.c | 3 ---
|
||||
2 files changed, 0 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
index 6c53508..63464ad 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
@@ -385,8 +385,6 @@ struct omap_mcbsp {
|
||||
void __iomem *io_base;
|
||||
u8 id;
|
||||
u8 free;
|
||||
- omap_mcbsp_word_length rx_word_length;
|
||||
- omap_mcbsp_word_length tx_word_length;
|
||||
|
||||
int rx_irq;
|
||||
int tx_irq;
|
||||
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
|
||||
index 455eadc..3c1fbdc 100644
|
||||
--- a/arch/arm/plat-omap/mcbsp.c
|
||||
+++ b/arch/arm/plat-omap/mcbsp.c
|
||||
@@ -869,9 +869,6 @@ void omap_mcbsp_start(unsigned int id, int tx, int rx)
|
||||
if (cpu_is_omap34xx())
|
||||
omap_st_start(mcbsp);
|
||||
|
||||
- mcbsp->rx_word_length = (MCBSP_READ_CACHE(mcbsp, RCR1) >> 5) & 0x7;
|
||||
- mcbsp->tx_word_length = (MCBSP_READ_CACHE(mcbsp, XCR1) >> 5) & 0x7;
|
||||
-
|
||||
/* Only enable SRG, if McBSP is master */
|
||||
w = MCBSP_READ_CACHE(mcbsp, PCR0);
|
||||
if (w & (FSXM | FSRM | CLKXM | CLKRM))
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
From a16f9faa682c8cdd3bbd14618600ec67e4a56963 Mon Sep 17 00:00:00 2001
|
||||
From: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Date: Fri, 1 Jul 2011 08:52:27 +0000
|
||||
Subject: [PATCH 027/149] omap: mcbsp: Remove port number enums
|
||||
|
||||
These McBSP port number enums are used only in two places in the McBSP code
|
||||
so we may remove then and just use numeric values like rest of the code does.
|
||||
|
||||
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
|
||||
Signed-off-by: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/mach-omap1/mcbsp.c | 4 ++--
|
||||
arch/arm/plat-omap/include/plat/mcbsp.h | 10 +---------
|
||||
2 files changed, 3 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
|
||||
index d9af981..ab7395d 100644
|
||||
--- a/arch/arm/mach-omap1/mcbsp.c
|
||||
+++ b/arch/arm/mach-omap1/mcbsp.c
|
||||
@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id)
|
||||
* On 1510, 1610 and 1710, McBSP1 and McBSP3
|
||||
* are DSP public peripherals.
|
||||
*/
|
||||
- if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
|
||||
+ if (id == 0 || id == 2) {
|
||||
if (dsp_use++ == 0) {
|
||||
api_clk = clk_get(NULL, "api_ck");
|
||||
dsp_clk = clk_get(NULL, "dsp_ck");
|
||||
@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id)
|
||||
|
||||
static void omap1_mcbsp_free(unsigned int id)
|
||||
{
|
||||
- if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
|
||||
+ if (id == 0 || id == 2) {
|
||||
if (--dsp_use == 0) {
|
||||
if (!IS_ERR(api_clk)) {
|
||||
clk_disable(api_clk);
|
||||
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
index 63464ad..9882c657 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/mcbsp.h
|
||||
@@ -33,7 +33,7 @@
|
||||
#define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \
|
||||
static struct platform_device omap_mcbsp##port_nr = { \
|
||||
.name = "omap-mcbsp-dai", \
|
||||
- .id = OMAP_MCBSP##port_nr, \
|
||||
+ .id = port_nr - 1, \
|
||||
}
|
||||
|
||||
#define MCBSP_CONFIG_TYPE2 0x2
|
||||
@@ -332,14 +332,6 @@ struct omap_mcbsp_reg_cfg {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
- OMAP_MCBSP1 = 0,
|
||||
- OMAP_MCBSP2,
|
||||
- OMAP_MCBSP3,
|
||||
- OMAP_MCBSP4,
|
||||
- OMAP_MCBSP5
|
||||
-} omap_mcbsp_id;
|
||||
-
|
||||
-typedef enum {
|
||||
OMAP_MCBSP_WORD_8 = 0,
|
||||
OMAP_MCBSP_WORD_12,
|
||||
OMAP_MCBSP_WORD_16,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
From 4e6a7403182e1e30f8b403e7931ce7c832cb5db3 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Walmsley <paul@pwsan.com>
|
||||
Date: Sat, 9 Jul 2011 18:00:25 -0600
|
||||
Subject: [PATCH 028/149] OMAP: dmtimer: add missing include
|
||||
|
||||
After commit caf64f2fdc48472995d40656eb1a75524c464447 ("omap: Make a subset
|
||||
of dmtimer functions into inline functions"),
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h is missing an include of linux/io.h
|
||||
- add it.
|
||||
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
Cc: Tony Lindgren <tony@atomide.com>
|
||||
---
|
||||
arch/arm/plat-omap/include/plat/dmtimer.h | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
index d0f3a2d..eb5d16c 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/io.h>
|
||||
|
||||
#ifndef __ASM_ARCH_DMTIMER_H
|
||||
#define __ASM_ARCH_DMTIMER_H
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-130
@@ -1,130 +0,0 @@
|
||||
From 8a9259c5eedfeb7e2dd3e001aa68e4e1a9149b41 Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:00 +0200
|
||||
Subject: [PATCH 029/149] OMAP2+: hwmod: Fix smart-standby + wakeup support
|
||||
|
||||
The commit 86009eb326afde34ffdc5648cd344aa86b8d58d4 was adding
|
||||
the wakeup support for new OMAP4 IPs. This support is incomplete for
|
||||
busmaster IPs that need as well to use smart-standby with wakeup.
|
||||
|
||||
This new standbymode is suported on HSI and USB_HOST_FS for the moment.
|
||||
|
||||
Add the new MSTANDBY_SMART_WKUP flag to mark the IPs that support this
|
||||
capability.
|
||||
|
||||
Enable this new mode when applicable in _enable_wakeup, _disable_wakeup,
|
||||
_enable_sysc and _idle_sysc.
|
||||
|
||||
The omap_hwmod_44xx_data.c will have to be updated to add this new flag.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 34 +++++++++++++++++++++----
|
||||
arch/arm/plat-omap/include/plat/omap_hwmod.h | 2 +-
|
||||
2 files changed, 29 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index 293fa6c..384d3c3 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -391,7 +391,8 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
|
||||
if (!oh->class->sysc ||
|
||||
!((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
|
||||
- (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)))
|
||||
+ (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
|
||||
+ (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!oh->class->sysc->sysc_fields) {
|
||||
@@ -405,6 +406,8 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
|
||||
if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
|
||||
_set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
|
||||
+ if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
|
||||
+ _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
|
||||
|
||||
/* XXX test pwrdm_get_wken for this hwmod's subsystem */
|
||||
|
||||
@@ -426,7 +429,8 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
|
||||
if (!oh->class->sysc ||
|
||||
!((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
|
||||
- (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)))
|
||||
+ (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
|
||||
+ (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
|
||||
return -EINVAL;
|
||||
|
||||
if (!oh->class->sysc->sysc_fields) {
|
||||
@@ -440,6 +444,8 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
|
||||
if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
|
||||
_set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);
|
||||
+ if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
|
||||
+ _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
|
||||
|
||||
/* XXX test pwrdm_get_wken for this hwmod's subsystem */
|
||||
|
||||
@@ -781,8 +787,16 @@ static void _enable_sysc(struct omap_hwmod *oh)
|
||||
}
|
||||
|
||||
if (sf & SYSC_HAS_MIDLEMODE) {
|
||||
- idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
|
||||
- HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
|
||||
+ if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
|
||||
+ idlemode = HWMOD_IDLEMODE_NO;
|
||||
+ } else {
|
||||
+ if (sf & SYSC_HAS_ENAWAKEUP)
|
||||
+ _enable_wakeup(oh, &v);
|
||||
+ if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
|
||||
+ idlemode = HWMOD_IDLEMODE_SMART_WKUP;
|
||||
+ else
|
||||
+ idlemode = HWMOD_IDLEMODE_SMART;
|
||||
+ }
|
||||
_set_master_standbymode(oh, idlemode, &v);
|
||||
}
|
||||
|
||||
@@ -840,8 +854,16 @@ static void _idle_sysc(struct omap_hwmod *oh)
|
||||
}
|
||||
|
||||
if (sf & SYSC_HAS_MIDLEMODE) {
|
||||
- idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ?
|
||||
- HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART;
|
||||
+ if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
|
||||
+ idlemode = HWMOD_IDLEMODE_FORCE;
|
||||
+ } else {
|
||||
+ if (sf & SYSC_HAS_ENAWAKEUP)
|
||||
+ _enable_wakeup(oh, &v);
|
||||
+ if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
|
||||
+ idlemode = HWMOD_IDLEMODE_SMART_WKUP;
|
||||
+ else
|
||||
+ idlemode = HWMOD_IDLEMODE_SMART;
|
||||
+ }
|
||||
_set_master_standbymode(oh, idlemode, &v);
|
||||
}
|
||||
|
||||
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h
|
||||
index 1adea9c..e93438c 100644
|
||||
--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h
|
||||
+++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h
|
||||
@@ -77,7 +77,6 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2;
|
||||
#define HWMOD_IDLEMODE_FORCE (1 << 0)
|
||||
#define HWMOD_IDLEMODE_NO (1 << 1)
|
||||
#define HWMOD_IDLEMODE_SMART (1 << 2)
|
||||
-/* Slave idle mode flag only */
|
||||
#define HWMOD_IDLEMODE_SMART_WKUP (1 << 3)
|
||||
|
||||
/**
|
||||
@@ -258,6 +257,7 @@ struct omap_hwmod_ocp_if {
|
||||
#define MSTANDBY_FORCE (HWMOD_IDLEMODE_FORCE << MASTER_STANDBY_SHIFT)
|
||||
#define MSTANDBY_NO (HWMOD_IDLEMODE_NO << MASTER_STANDBY_SHIFT)
|
||||
#define MSTANDBY_SMART (HWMOD_IDLEMODE_SMART << MASTER_STANDBY_SHIFT)
|
||||
+#define MSTANDBY_SMART_WKUP (HWMOD_IDLEMODE_SMART_WKUP << MASTER_STANDBY_SHIFT)
|
||||
|
||||
/* omap_hwmod_sysconfig.sysc_flags capability flags */
|
||||
#define SYSC_HAS_AUTOIDLE (1 << 0)
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
From 8823fd9b9f1d6e6406c0b98438ad6282491b0ae5 Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:01 +0200
|
||||
Subject: [PATCH 030/149] OMAP4: hwmod data: Add MSTANDBY_SMART_WKUP flag
|
||||
|
||||
Add the flag to every IPs that support it to allow the
|
||||
framework to enable it instead of the SMART_STANDBY default
|
||||
mode.
|
||||
Without that, an IP with busmaster capability will not
|
||||
be able to wakeup the interconnect at all.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 9 +++++----
|
||||
1 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
index e1c69ff..8cbbfbf 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -660,7 +660,8 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
|
||||
.sysc_offs = 0x0010,
|
||||
.sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
- MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
|
||||
+ MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
|
||||
+ MSTANDBY_SMART_WKUP),
|
||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||
};
|
||||
|
||||
@@ -2044,7 +2045,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
|
||||
SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
|
||||
- MSTANDBY_SMART),
|
||||
+ MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
|
||||
.sysc_fields = &omap_hwmod_sysc_type1,
|
||||
};
|
||||
|
||||
@@ -2446,7 +2447,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
|
||||
SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
|
||||
- MSTANDBY_SMART),
|
||||
+ MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
|
||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||
};
|
||||
|
||||
@@ -3420,7 +3421,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
|
||||
SYSC_HAS_SOFTRESET),
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
|
||||
- MSTANDBY_SMART),
|
||||
+ MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
|
||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||
};
|
||||
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From 3097e6265e79329635b528dd97b7fa3ed7dbb805 Mon Sep 17 00:00:00 2001
|
||||
From: Miguel Vadillo <vadillo@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:02 +0200
|
||||
Subject: [PATCH 031/149] OMAP2+: hwmod: Enable module in shutdown to access sysconfig
|
||||
|
||||
When calling the shutdown, the module may be already in idle.
|
||||
Accessing the sysconfig register will then lead to a crash.
|
||||
In that case, re-enable the module in order to allow the access
|
||||
to the sysconfig register.
|
||||
|
||||
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 5 ++++-
|
||||
1 files changed, 4 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index 384d3c3..cbc2a8a 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -1396,8 +1396,11 @@ static int _shutdown(struct omap_hwmod *oh)
|
||||
}
|
||||
}
|
||||
|
||||
- if (oh->class->sysc)
|
||||
+ if (oh->class->sysc) {
|
||||
+ if (oh->_state == _HWMOD_STATE_IDLE)
|
||||
+ _enable(oh);
|
||||
_shutdown_sysc(oh);
|
||||
+ }
|
||||
|
||||
/*
|
||||
* If an IP contains only one HW reset line, then assert it
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
From 0b7a00a668b460c5a541d2d9d77a96cd0de3f57d Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:03 +0200
|
||||
Subject: [PATCH 032/149] OMAP2+: hwmod: Do not write the enawakeup bit if SYSC_HAS_ENAWAKEUP is not set
|
||||
|
||||
The Type 2 type of IPs will not have any enawakeup bit in their sysconfig.
|
||||
Writing to that bit will instead trigger a softreset.
|
||||
Check the flag to write this bit only if the module supports it.
|
||||
|
||||
Reported-by: Miguel Vadillo <vadillo@ti.com>
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 14 ++++----------
|
||||
1 files changed, 4 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index cbc2a8a..3800084 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -387,8 +387,6 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
|
||||
*/
|
||||
static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
{
|
||||
- u32 wakeup_mask;
|
||||
-
|
||||
if (!oh->class->sysc ||
|
||||
!((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
|
||||
(oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
|
||||
@@ -400,9 +398,8 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
|
||||
-
|
||||
- *v |= wakeup_mask;
|
||||
+ if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
|
||||
+ *v |= 0x1 << oh->class->sysc->sysc_fields->enwkup_shift;
|
||||
|
||||
if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
|
||||
_set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
|
||||
@@ -425,8 +422,6 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
*/
|
||||
static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
{
|
||||
- u32 wakeup_mask;
|
||||
-
|
||||
if (!oh->class->sysc ||
|
||||
!((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
|
||||
(oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
|
||||
@@ -438,9 +433,8 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
|
||||
-
|
||||
- *v &= ~wakeup_mask;
|
||||
+ if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
|
||||
+ *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
|
||||
|
||||
if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
|
||||
_set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
From 9c5dd6c8e5a9dd6fc98e30a45a3d929034de664b Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:04 +0200
|
||||
Subject: [PATCH 033/149] OMAP2+: hwmod: Remove _populate_mpu_rt_base warning
|
||||
|
||||
It is perfectly valid for some hwmod to not have any
|
||||
register target address for sysconfig. This is especially
|
||||
true for interconnect hwmods.
|
||||
Remove the warning.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 3 ---
|
||||
1 files changed, 0 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index 3800084..f401417 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -1704,9 +1704,6 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
|
||||
return 0;
|
||||
|
||||
oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
|
||||
- if (!oh->_mpu_rt_va)
|
||||
- pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n",
|
||||
- __func__, oh->name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-87
@@ -1,87 +0,0 @@
|
||||
From 0fdacba393a3d2b2c87b4a9c4b2bb811bd896c09 Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:05 +0200
|
||||
Subject: [PATCH 034/149] OMAP2+: hwmod: Fix the HW reset management
|
||||
|
||||
The HW reset must be de-assert after the clocks are enabled
|
||||
but before waiting for the target to be ready. Otherwise the
|
||||
reset might not work properly since the clock is not running
|
||||
to proceed the reset.
|
||||
|
||||
De-assert the reset after _enable_clocks and before
|
||||
_wait_target_ready.
|
||||
Re-assert it only when the clocks are disabled.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 32 ++++++++++++++++----------------
|
||||
1 files changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index f401417..df91bb1 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -1250,15 +1250,6 @@ static int _enable(struct omap_hwmod *oh)
|
||||
|
||||
pr_debug("omap_hwmod: %s: enabling\n", oh->name);
|
||||
|
||||
- /*
|
||||
- * If an IP contains only one HW reset line, then de-assert it in order
|
||||
- * to allow to enable the clocks. Otherwise the PRCM will return
|
||||
- * Intransition status, and the init will failed.
|
||||
- */
|
||||
- if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
|
||||
- oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)
|
||||
- _deassert_hardreset(oh, oh->rst_lines[0].name);
|
||||
-
|
||||
/* Mux pins for device runtime if populated */
|
||||
if (oh->mux && (!oh->mux->enabled ||
|
||||
((oh->_state == _HWMOD_STATE_IDLE) &&
|
||||
@@ -1268,6 +1259,15 @@ static int _enable(struct omap_hwmod *oh)
|
||||
_add_initiator_dep(oh, mpu_oh);
|
||||
_enable_clocks(oh);
|
||||
|
||||
+ /*
|
||||
+ * If an IP contains only one HW reset line, then de-assert it in order
|
||||
+ * to allow the module state transition. Otherwise the PRCM will return
|
||||
+ * Intransition status, and the init will failed.
|
||||
+ */
|
||||
+ if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
|
||||
+ oh->_state == _HWMOD_STATE_DISABLED) && oh->rst_lines_cnt == 1)
|
||||
+ _deassert_hardreset(oh, oh->rst_lines[0].name);
|
||||
+
|
||||
r = _wait_target_ready(oh);
|
||||
if (!r) {
|
||||
oh->_state = _HWMOD_STATE_ENABLED;
|
||||
@@ -1396,13 +1396,6 @@ static int _shutdown(struct omap_hwmod *oh)
|
||||
_shutdown_sysc(oh);
|
||||
}
|
||||
|
||||
- /*
|
||||
- * If an IP contains only one HW reset line, then assert it
|
||||
- * before disabling the clocks and shutting down the IP.
|
||||
- */
|
||||
- if (oh->rst_lines_cnt == 1)
|
||||
- _assert_hardreset(oh, oh->rst_lines[0].name);
|
||||
-
|
||||
/* clocks and deps are already disabled in idle */
|
||||
if (oh->_state == _HWMOD_STATE_ENABLED) {
|
||||
_del_initiator_dep(oh, mpu_oh);
|
||||
@@ -1411,6 +1404,13 @@ static int _shutdown(struct omap_hwmod *oh)
|
||||
}
|
||||
/* XXX Should this code also force-disable the optional clocks? */
|
||||
|
||||
+ /*
|
||||
+ * If an IP contains only one HW reset line, then assert it
|
||||
+ * after disabling the clocks and before shutting down the IP.
|
||||
+ */
|
||||
+ if (oh->rst_lines_cnt == 1)
|
||||
+ _assert_hardreset(oh, oh->rst_lines[0].name);
|
||||
+
|
||||
/* Mux pins to safe mode or use populated off mode values */
|
||||
if (oh->mux)
|
||||
omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
From ea1e84fd91f4bfa506f7d44c4183ab649308b940 Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:06 +0200
|
||||
Subject: [PATCH 035/149] OMAP: hwmod: Add warnings if enable failed
|
||||
|
||||
Change the debug into warning to check what IPs are failing.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Cc: Rajendra Nayak <rnayak@ti.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index df91bb1..64e9830 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -944,6 +944,8 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
|
||||
|
||||
if (!ret)
|
||||
oh->_state = _HWMOD_STATE_CLKS_INITED;
|
||||
+ else
|
||||
+ pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
From 1a090fd9d66008314ef1963ff7335462b4231d8b Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Fri, 1 Jul 2011 22:54:07 +0200
|
||||
Subject: [PATCH 036/149] OMAP: hwmod: Move pr_debug to improve the readability
|
||||
|
||||
Move the pr_debug at the top of the function
|
||||
to trace the entry even if the first test is failing.
|
||||
That help understanding that we entered the function
|
||||
but failed in it.
|
||||
|
||||
Move the _enable last part out of the test to reduce
|
||||
indentation and improve readability.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod.c | 32 +++++++++++++++++---------------
|
||||
1 files changed, 17 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
index 64e9830..e530bcb 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod.c
|
||||
@@ -1242,6 +1242,8 @@ static int _enable(struct omap_hwmod *oh)
|
||||
{
|
||||
int r;
|
||||
|
||||
+ pr_debug("omap_hwmod: %s: enabling\n", oh->name);
|
||||
+
|
||||
if (oh->_state != _HWMOD_STATE_INITIALIZED &&
|
||||
oh->_state != _HWMOD_STATE_IDLE &&
|
||||
oh->_state != _HWMOD_STATE_DISABLED) {
|
||||
@@ -1250,8 +1252,6 @@ static int _enable(struct omap_hwmod *oh)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- pr_debug("omap_hwmod: %s: enabling\n", oh->name);
|
||||
-
|
||||
/* Mux pins for device runtime if populated */
|
||||
if (oh->mux && (!oh->mux->enabled ||
|
||||
((oh->_state == _HWMOD_STATE_IDLE) &&
|
||||
@@ -1271,19 +1271,21 @@ static int _enable(struct omap_hwmod *oh)
|
||||
_deassert_hardreset(oh, oh->rst_lines[0].name);
|
||||
|
||||
r = _wait_target_ready(oh);
|
||||
- if (!r) {
|
||||
- oh->_state = _HWMOD_STATE_ENABLED;
|
||||
-
|
||||
- /* Access the sysconfig only if the target is ready */
|
||||
- if (oh->class->sysc) {
|
||||
- if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED))
|
||||
- _update_sysc_cache(oh);
|
||||
- _enable_sysc(oh);
|
||||
- }
|
||||
- } else {
|
||||
- _disable_clocks(oh);
|
||||
+ if (r) {
|
||||
pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n",
|
||||
oh->name, r);
|
||||
+ _disable_clocks(oh);
|
||||
+
|
||||
+ return r;
|
||||
+ }
|
||||
+
|
||||
+ oh->_state = _HWMOD_STATE_ENABLED;
|
||||
+
|
||||
+ /* Access the sysconfig only if the target is ready */
|
||||
+ if (oh->class->sysc) {
|
||||
+ if (!(oh->_int_flags & _HWMOD_SYSCONFIG_LOADED))
|
||||
+ _update_sysc_cache(oh);
|
||||
+ _enable_sysc(oh);
|
||||
}
|
||||
|
||||
return r;
|
||||
@@ -1299,14 +1301,14 @@ static int _enable(struct omap_hwmod *oh)
|
||||
*/
|
||||
static int _idle(struct omap_hwmod *oh)
|
||||
{
|
||||
+ pr_debug("omap_hwmod: %s: idling\n", oh->name);
|
||||
+
|
||||
if (oh->_state != _HWMOD_STATE_ENABLED) {
|
||||
WARN(1, "omap_hwmod: %s: idle state can only be entered from "
|
||||
"enabled state\n", oh->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- pr_debug("omap_hwmod: %s: idling\n", oh->name);
|
||||
-
|
||||
if (oh->class->sysc)
|
||||
_idle_sysc(oh);
|
||||
_del_initiator_dep(oh, mpu_oh);
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-3529
File diff suppressed because it is too large
Load Diff
-1958
File diff suppressed because it is too large
Load Diff
-2904
File diff suppressed because it is too large
Load Diff
-1815
File diff suppressed because it is too large
Load Diff
-1382
File diff suppressed because it is too large
Load Diff
-935
@@ -1,935 +0,0 @@
|
||||
From 79a8b76e605e0930ef1c52c2a757eb523340cda1 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Walmsley <paul@pwsan.com>
|
||||
Date: Sat, 9 Jul 2011 19:14:07 -0600
|
||||
Subject: [PATCH 042/149] omap_hwmod: share identical omap_hwmod_dma_info arrays
|
||||
|
||||
To reduce kernel source file data duplication, share struct
|
||||
omap_hwmod_dma_info arrays across OMAP2xxx and 3xxx hwmod data files.
|
||||
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_2420_data.c | 87 ++----------------
|
||||
arch/arm/mach-omap2/omap_hwmod_2430_data.c | 95 +++-----------------
|
||||
.../mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c | 92 +++++++++++++++++++
|
||||
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c | 6 ++
|
||||
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 89 ++----------------
|
||||
arch/arm/mach-omap2/omap_hwmod_common_data.c | 20 ----
|
||||
arch/arm/mach-omap2/omap_hwmod_common_data.h | 15 +++
|
||||
7 files changed, 144 insertions(+), 260 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
|
||||
index 60c817e..6acc01f 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
|
||||
@@ -828,12 +828,6 @@ static struct omap_hwmod_class uart_class = {
|
||||
|
||||
/* UART1 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
|
||||
&omap2_l4_core__uart1,
|
||||
};
|
||||
@@ -841,7 +835,7 @@ static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
|
||||
static struct omap_hwmod omap2420_uart1_hwmod = {
|
||||
.name = "uart1",
|
||||
.mpu_irqs = omap2_uart1_mpu_irqs,
|
||||
- .sdma_reqs = uart1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart1_sdma_reqs,
|
||||
.main_clk = "uart1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -860,12 +854,6 @@ static struct omap_hwmod omap2420_uart1_hwmod = {
|
||||
|
||||
/* UART2 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
|
||||
&omap2_l4_core__uart2,
|
||||
};
|
||||
@@ -873,7 +861,7 @@ static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
|
||||
static struct omap_hwmod omap2420_uart2_hwmod = {
|
||||
.name = "uart2",
|
||||
.mpu_irqs = omap2_uart2_mpu_irqs,
|
||||
- .sdma_reqs = uart2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart2_sdma_reqs,
|
||||
.main_clk = "uart2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -892,12 +880,6 @@ static struct omap_hwmod omap2420_uart2_hwmod = {
|
||||
|
||||
/* UART3 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
|
||||
&omap2_l4_core__uart3,
|
||||
};
|
||||
@@ -905,7 +887,7 @@ static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
|
||||
static struct omap_hwmod omap2420_uart3_hwmod = {
|
||||
.name = "uart3",
|
||||
.mpu_irqs = omap2_uart3_mpu_irqs,
|
||||
- .sdma_reqs = uart3_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart3_sdma_reqs,
|
||||
.main_clk = "uart3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -940,11 +922,6 @@ static struct omap_hwmod_class omap2420_dss_hwmod_class = {
|
||||
.sysc = &omap2420_dss_sysc,
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = {
|
||||
- { .name = "dispc", .dma_req = 5 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* dss */
|
||||
/* dss master ports */
|
||||
static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
|
||||
@@ -980,7 +957,7 @@ static struct omap_hwmod omap2420_dss_core_hwmod = {
|
||||
.name = "dss_core",
|
||||
.class = &omap2420_dss_hwmod_class,
|
||||
.main_clk = "dss1_fck", /* instead of dss_fck */
|
||||
- .sdma_reqs = omap2420_dss_sdma_chs,
|
||||
+ .sdma_reqs = omap2xxx_dss_sdma_chs,
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
@@ -1183,12 +1160,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr;
|
||||
|
||||
/* I2C1 */
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
|
||||
&omap2420_l4_core__i2c1,
|
||||
};
|
||||
@@ -1196,7 +1167,7 @@ static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
|
||||
static struct omap_hwmod omap2420_i2c1_hwmod = {
|
||||
.name = "i2c1",
|
||||
.mpu_irqs = omap2_i2c1_mpu_irqs,
|
||||
- .sdma_reqs = i2c1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c1_sdma_reqs,
|
||||
.main_clk = "i2c1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1217,12 +1188,6 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
|
||||
|
||||
/* I2C2 */
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
|
||||
&omap2420_l4_core__i2c2,
|
||||
};
|
||||
@@ -1230,7 +1195,7 @@ static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
|
||||
static struct omap_hwmod omap2420_i2c2_hwmod = {
|
||||
.name = "i2c2",
|
||||
.mpu_irqs = omap2_i2c2_mpu_irqs,
|
||||
- .sdma_reqs = i2c2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c2_sdma_reqs,
|
||||
.main_clk = "i2c2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1602,18 +1567,6 @@ static struct omap_hwmod_class omap2420_mcspi_class = {
|
||||
};
|
||||
|
||||
/* mcspi1 */
|
||||
-static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
|
||||
- { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
|
||||
- { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
|
||||
- { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
|
||||
- { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
|
||||
- { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
|
||||
- { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
|
||||
- { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
|
||||
&omap2420_l4_core__mcspi1,
|
||||
};
|
||||
@@ -1625,7 +1578,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
|
||||
static struct omap_hwmod omap2420_mcspi1_hwmod = {
|
||||
.name = "mcspi1_hwmod",
|
||||
.mpu_irqs = omap2_mcspi1_mpu_irqs,
|
||||
- .sdma_reqs = omap2420_mcspi1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi1_sdma_reqs,
|
||||
.main_clk = "mcspi1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1644,14 +1597,6 @@ static struct omap_hwmod omap2420_mcspi1_hwmod = {
|
||||
};
|
||||
|
||||
/* mcspi2 */
|
||||
-static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
|
||||
- { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
|
||||
- { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
|
||||
- { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
|
||||
&omap2420_l4_core__mcspi2,
|
||||
};
|
||||
@@ -1663,7 +1608,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
|
||||
static struct omap_hwmod omap2420_mcspi2_hwmod = {
|
||||
.name = "mcspi2_hwmod",
|
||||
.mpu_irqs = omap2_mcspi2_mpu_irqs,
|
||||
- .sdma_reqs = omap2420_mcspi2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi2_sdma_reqs,
|
||||
.main_clk = "mcspi2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1697,12 +1642,6 @@ static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 32 },
|
||||
- { .name = "tx", .dma_req = 31 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* l4_core -> mcbsp1 */
|
||||
static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
|
||||
.master = &omap2420_l4_core_hwmod,
|
||||
@@ -1721,7 +1660,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap2420_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2420_mcbsp1_irqs,
|
||||
- .sdma_reqs = omap2420_mcbsp1_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp1_sdma_reqs,
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1744,12 +1683,6 @@ static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 34 },
|
||||
- { .name = "tx", .dma_req = 33 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* l4_core -> mcbsp2 */
|
||||
static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
|
||||
.master = &omap2420_l4_core_hwmod,
|
||||
@@ -1768,7 +1701,7 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap2420_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2420_mcbsp2_irqs,
|
||||
- .sdma_reqs = omap2420_mcbsp2_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp2_sdma_reqs,
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
|
||||
index af758b3..639acd5 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
|
||||
@@ -900,12 +900,6 @@ static struct omap_hwmod_class uart_class = {
|
||||
|
||||
/* UART1 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
|
||||
&omap2_l4_core__uart1,
|
||||
};
|
||||
@@ -913,7 +907,7 @@ static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
|
||||
static struct omap_hwmod omap2430_uart1_hwmod = {
|
||||
.name = "uart1",
|
||||
.mpu_irqs = omap2_uart1_mpu_irqs,
|
||||
- .sdma_reqs = uart1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart1_sdma_reqs,
|
||||
.main_clk = "uart1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -932,12 +926,6 @@ static struct omap_hwmod omap2430_uart1_hwmod = {
|
||||
|
||||
/* UART2 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
|
||||
&omap2_l4_core__uart2,
|
||||
};
|
||||
@@ -945,7 +933,7 @@ static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
|
||||
static struct omap_hwmod omap2430_uart2_hwmod = {
|
||||
.name = "uart2",
|
||||
.mpu_irqs = omap2_uart2_mpu_irqs,
|
||||
- .sdma_reqs = uart2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart2_sdma_reqs,
|
||||
.main_clk = "uart2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -964,12 +952,6 @@ static struct omap_hwmod omap2430_uart2_hwmod = {
|
||||
|
||||
/* UART3 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
|
||||
&omap2_l4_core__uart3,
|
||||
};
|
||||
@@ -977,7 +959,7 @@ static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
|
||||
static struct omap_hwmod omap2430_uart3_hwmod = {
|
||||
.name = "uart3",
|
||||
.mpu_irqs = omap2_uart3_mpu_irqs,
|
||||
- .sdma_reqs = uart3_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart3_sdma_reqs,
|
||||
.main_clk = "uart3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1012,11 +994,6 @@ static struct omap_hwmod_class omap2430_dss_hwmod_class = {
|
||||
.sysc = &omap2430_dss_sysc,
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
|
||||
- { .name = "dispc", .dma_req = 5 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* dss */
|
||||
/* dss master ports */
|
||||
static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
|
||||
@@ -1046,7 +1023,7 @@ static struct omap_hwmod omap2430_dss_core_hwmod = {
|
||||
.name = "dss_core",
|
||||
.class = &omap2430_dss_hwmod_class,
|
||||
.main_clk = "dss1_fck", /* instead of dss_fck */
|
||||
- .sdma_reqs = omap2430_dss_sdma_chs,
|
||||
+ .sdma_reqs = omap2xxx_dss_sdma_chs,
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
.prcm_reg_id = 1,
|
||||
@@ -1234,12 +1211,6 @@ static struct omap_i2c_dev_attr i2c_dev_attr = {
|
||||
|
||||
/* I2C1 */
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
|
||||
&omap2430_l4_core__i2c1,
|
||||
};
|
||||
@@ -1247,7 +1218,7 @@ static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
|
||||
static struct omap_hwmod omap2430_i2c1_hwmod = {
|
||||
.name = "i2c1",
|
||||
.mpu_irqs = omap2_i2c1_mpu_irqs,
|
||||
- .sdma_reqs = i2c1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c1_sdma_reqs,
|
||||
.main_clk = "i2chs1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1275,12 +1246,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
|
||||
|
||||
/* I2C2 */
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
|
||||
&omap2430_l4_core__i2c2,
|
||||
};
|
||||
@@ -1288,7 +1253,7 @@ static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
|
||||
static struct omap_hwmod omap2430_i2c2_hwmod = {
|
||||
.name = "i2c2",
|
||||
.mpu_irqs = omap2_i2c2_mpu_irqs,
|
||||
- .sdma_reqs = i2c2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c2_sdma_reqs,
|
||||
.main_clk = "i2chs2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1707,18 +1672,6 @@ static struct omap_hwmod_class omap2430_mcspi_class = {
|
||||
};
|
||||
|
||||
/* mcspi1 */
|
||||
-static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
|
||||
- { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
|
||||
- { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
|
||||
- { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
|
||||
- { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
|
||||
- { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
|
||||
- { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
|
||||
- { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
|
||||
&omap2430_l4_core__mcspi1,
|
||||
};
|
||||
@@ -1730,7 +1683,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
|
||||
static struct omap_hwmod omap2430_mcspi1_hwmod = {
|
||||
.name = "mcspi1_hwmod",
|
||||
.mpu_irqs = omap2_mcspi1_mpu_irqs,
|
||||
- .sdma_reqs = omap2430_mcspi1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi1_sdma_reqs,
|
||||
.main_clk = "mcspi1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1749,14 +1702,6 @@ static struct omap_hwmod omap2430_mcspi1_hwmod = {
|
||||
};
|
||||
|
||||
/* mcspi2 */
|
||||
-static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
|
||||
- { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
|
||||
- { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
|
||||
- { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
|
||||
&omap2430_l4_core__mcspi2,
|
||||
};
|
||||
@@ -1768,7 +1713,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
|
||||
static struct omap_hwmod omap2430_mcspi2_hwmod = {
|
||||
.name = "mcspi2_hwmod",
|
||||
.mpu_irqs = omap2_mcspi2_mpu_irqs,
|
||||
- .sdma_reqs = omap2430_mcspi2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi2_sdma_reqs,
|
||||
.main_clk = "mcspi2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1912,12 +1857,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 32 },
|
||||
- { .name = "tx", .dma_req = 31 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* l4_core -> mcbsp1 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
@@ -1936,7 +1875,7 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp1_irqs,
|
||||
- .sdma_reqs = omap2430_mcbsp1_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp1_sdma_reqs,
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1960,12 +1899,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 34 },
|
||||
- { .name = "tx", .dma_req = 33 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
/* l4_core -> mcbsp2 */
|
||||
static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
|
||||
.master = &omap2430_l4_core_hwmod,
|
||||
@@ -1984,7 +1917,7 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp2_irqs,
|
||||
- .sdma_reqs = omap2430_mcbsp2_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp2_sdma_reqs,
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2008,12 +1941,6 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 18 },
|
||||
- { .name = "tx", .dma_req = 17 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
@@ -2042,7 +1969,7 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
|
||||
.name = "mcbsp3",
|
||||
.class = &omap2430_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap2430_mcbsp3_irqs,
|
||||
- .sdma_reqs = omap2430_mcbsp3_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp3_sdma_reqs,
|
||||
.main_clk = "mcbsp3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
|
||||
index 245294b..7c4f5ab 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
|
||||
@@ -10,11 +10,35 @@
|
||||
*/
|
||||
#include <plat/omap_hwmod.h>
|
||||
#include <plat/serial.h>
|
||||
+#include <plat/dma.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
#include "omap_hwmod_common_data.h"
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * omap_hwmod class data
|
||||
+ */
|
||||
+
|
||||
+struct omap_hwmod_class l3_hwmod_class = {
|
||||
+ .name = "l3"
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_class l4_hwmod_class = {
|
||||
+ .name = "l4"
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_class mpu_hwmod_class = {
|
||||
+ .name = "mpu"
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_class iva_hwmod_class = {
|
||||
+ .name = "iva"
|
||||
+};
|
||||
+
|
||||
+/* Common MPU IRQ line data */
|
||||
+
|
||||
struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
|
||||
{ .irq = 37, },
|
||||
{ .irq = -1 }
|
||||
@@ -138,5 +162,73 @@ struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
+/* Common DMA request line data */
|
||||
+struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
|
||||
+ { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
|
||||
+ { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
|
||||
+ { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
|
||||
+ { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
|
||||
+ { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
|
||||
+ { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
|
||||
+ { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = {
|
||||
+ { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
|
||||
+ { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
|
||||
+ { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
|
||||
+ { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
|
||||
+ { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
|
||||
+ { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
|
||||
+ { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
|
||||
+ { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = {
|
||||
+ { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
|
||||
+ { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
|
||||
+ { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
|
||||
+ { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = 32 },
|
||||
+ { .name = "tx", .dma_req = 31 },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = 34 },
|
||||
+ { .name = "tx", .dma_req = 33 },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = {
|
||||
+ { .name = "rx", .dma_req = 18 },
|
||||
+ { .name = "tx", .dma_req = 17 },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
|
||||
index 5a078a6..f5b63ef 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
#include <plat/omap_hwmod.h>
|
||||
#include <plat/serial.h>
|
||||
+#include <plat/dma.h>
|
||||
|
||||
#include <mach/irqs.h>
|
||||
|
||||
@@ -19,3 +20,8 @@ struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
|
||||
{ .irq = 48, },
|
||||
{ .irq = -1 }
|
||||
};
|
||||
+
|
||||
+struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
|
||||
+ { .name = "dispc", .dma_req = 5 },
|
||||
+ { .dma_req = -1 }
|
||||
+};
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
index 265f0b1..001f67b 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
|
||||
@@ -1210,12 +1210,6 @@ static struct omap_hwmod_class uart_class = {
|
||||
|
||||
/* UART1 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
|
||||
&omap3_l4_core__uart1,
|
||||
};
|
||||
@@ -1223,7 +1217,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
|
||||
static struct omap_hwmod omap3xxx_uart1_hwmod = {
|
||||
.name = "uart1",
|
||||
.mpu_irqs = omap2_uart1_mpu_irqs,
|
||||
- .sdma_reqs = uart1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart1_sdma_reqs,
|
||||
.main_clk = "uart1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1242,12 +1236,6 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
|
||||
|
||||
/* UART2 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
|
||||
&omap3_l4_core__uart2,
|
||||
};
|
||||
@@ -1255,7 +1243,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
|
||||
static struct omap_hwmod omap3xxx_uart2_hwmod = {
|
||||
.name = "uart2",
|
||||
.mpu_irqs = omap2_uart2_mpu_irqs,
|
||||
- .sdma_reqs = uart2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart2_sdma_reqs,
|
||||
.main_clk = "uart2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1274,12 +1262,6 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
|
||||
|
||||
/* UART3 */
|
||||
|
||||
-static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
|
||||
&omap3_l4_per__uart3,
|
||||
};
|
||||
@@ -1287,7 +1269,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
|
||||
static struct omap_hwmod omap3xxx_uart3_hwmod = {
|
||||
.name = "uart3",
|
||||
.mpu_irqs = omap2_uart3_mpu_irqs,
|
||||
- .sdma_reqs = uart3_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_uart3_sdma_reqs,
|
||||
.main_clk = "uart3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1714,12 +1696,6 @@ static struct omap_i2c_dev_attr i2c1_dev_attr = {
|
||||
.fifo_depth = 8, /* bytes */
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
|
||||
&omap3_l4_core__i2c1,
|
||||
};
|
||||
@@ -1727,7 +1703,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
|
||||
static struct omap_hwmod omap3xxx_i2c1_hwmod = {
|
||||
.name = "i2c1",
|
||||
.mpu_irqs = omap2_i2c1_mpu_irqs,
|
||||
- .sdma_reqs = i2c1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c1_sdma_reqs,
|
||||
.main_clk = "i2c1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -1751,12 +1727,6 @@ static struct omap_i2c_dev_attr i2c2_dev_attr = {
|
||||
.fifo_depth = 8, /* bytes */
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
|
||||
- { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
|
||||
- { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
|
||||
&omap3_l4_core__i2c2,
|
||||
};
|
||||
@@ -1764,7 +1734,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
|
||||
static struct omap_hwmod omap3xxx_i2c2_hwmod = {
|
||||
.name = "i2c2",
|
||||
.mpu_irqs = omap2_i2c2_mpu_irqs,
|
||||
- .sdma_reqs = i2c2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_i2c2_sdma_reqs,
|
||||
.main_clk = "i2c2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2269,12 +2239,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 32 },
|
||||
- { .name = "tx", .dma_req = 31 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
@@ -2303,7 +2267,7 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
|
||||
.name = "mcbsp1",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp1_irqs,
|
||||
- .sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp1_sdma_reqs,
|
||||
.main_clk = "mcbsp1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2327,12 +2291,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 34 },
|
||||
- { .name = "tx", .dma_req = 33 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
@@ -2349,7 +2307,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
|
||||
.slave = &omap3xxx_mcbsp2_hwmod,
|
||||
.clk = "mcbsp2_ick",
|
||||
.addr = omap3xxx_mcbsp2_addrs,
|
||||
-
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
@@ -2366,7 +2323,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
|
||||
.name = "mcbsp2",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp2_irqs,
|
||||
- .sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp2_sdma_reqs,
|
||||
.main_clk = "mcbsp2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2391,12 +2348,6 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
|
||||
{ .irq = -1 }
|
||||
};
|
||||
|
||||
-static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
|
||||
- { .name = "rx", .dma_req = 18 },
|
||||
- { .name = "tx", .dma_req = 17 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
|
||||
{
|
||||
.name = "mpu",
|
||||
@@ -2429,7 +2380,7 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
|
||||
.name = "mcbsp3",
|
||||
.class = &omap3xxx_mcbsp_hwmod_class,
|
||||
.mpu_irqs = omap3xxx_mcbsp3_irqs,
|
||||
- .sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
|
||||
+ .sdma_reqs = omap2_mcbsp3_sdma_reqs,
|
||||
.main_clk = "mcbsp3_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2939,18 +2890,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = {
|
||||
};
|
||||
|
||||
/* mcspi1 */
|
||||
-static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 35 },
|
||||
- { .name = "rx0", .dma_req = 36 },
|
||||
- { .name = "tx1", .dma_req = 37 },
|
||||
- { .name = "rx1", .dma_req = 38 },
|
||||
- { .name = "tx2", .dma_req = 39 },
|
||||
- { .name = "rx2", .dma_req = 40 },
|
||||
- { .name = "tx3", .dma_req = 41 },
|
||||
- { .name = "rx3", .dma_req = 42 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
|
||||
&omap34xx_l4_core__mcspi1,
|
||||
};
|
||||
@@ -2962,7 +2901,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
|
||||
static struct omap_hwmod omap34xx_mcspi1 = {
|
||||
.name = "mcspi1",
|
||||
.mpu_irqs = omap2_mcspi1_mpu_irqs,
|
||||
- .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi1_sdma_reqs,
|
||||
.main_clk = "mcspi1_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
@@ -2981,14 +2920,6 @@ static struct omap_hwmod omap34xx_mcspi1 = {
|
||||
};
|
||||
|
||||
/* mcspi2 */
|
||||
-static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
|
||||
- { .name = "tx0", .dma_req = 43 },
|
||||
- { .name = "rx0", .dma_req = 44 },
|
||||
- { .name = "tx1", .dma_req = 45 },
|
||||
- { .name = "rx1", .dma_req = 46 },
|
||||
- { .dma_req = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
|
||||
&omap34xx_l4_core__mcspi2,
|
||||
};
|
||||
@@ -3000,7 +2931,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
|
||||
static struct omap_hwmod omap34xx_mcspi2 = {
|
||||
.name = "mcspi2",
|
||||
.mpu_irqs = omap2_mcspi2_mpu_irqs,
|
||||
- .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
|
||||
+ .sdma_reqs = omap2_mcspi2_sdma_reqs,
|
||||
.main_clk = "mcspi2_fck",
|
||||
.prcm = {
|
||||
.omap2 = {
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c
|
||||
index 08a1342..de832eb 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c
|
||||
@@ -49,23 +49,3 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = {
|
||||
.srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT,
|
||||
};
|
||||
|
||||
-
|
||||
-/*
|
||||
- * omap_hwmod class data
|
||||
- */
|
||||
-
|
||||
-struct omap_hwmod_class l3_hwmod_class = {
|
||||
- .name = "l3"
|
||||
-};
|
||||
-
|
||||
-struct omap_hwmod_class l4_hwmod_class = {
|
||||
- .name = "l4"
|
||||
-};
|
||||
-
|
||||
-struct omap_hwmod_class mpu_hwmod_class = {
|
||||
- .name = "mpu"
|
||||
-};
|
||||
-
|
||||
-struct omap_hwmod_class iva_hwmod_class = {
|
||||
- .name = "iva"
|
||||
-};
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
|
||||
index 1ac878c..b636cf6 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
|
||||
@@ -51,6 +51,21 @@ extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
|
||||
|
||||
/* Common IP block data across OMAP2xxx */
|
||||
extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[];
|
||||
+
|
||||
+/* Common IP block data */
|
||||
+extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[];
|
||||
+extern struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[];
|
||||
+
|
||||
+/* Common IP block data on OMAP2430/OMAP3 */
|
||||
+extern struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[];
|
||||
|
||||
/* Common IP block data across OMAP2/3 */
|
||||
extern struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[];
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-1730
File diff suppressed because it is too large
Load Diff
-116
@@ -1,116 +0,0 @@
|
||||
From 9723d81494f83fd1f9beb8af0f440b0ed30435fb Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Sat, 9 Jul 2011 19:14:27 -0600
|
||||
Subject: [PATCH 044/149] OMAP4: hwmod data: Fix L3 interconnect data order and alignement
|
||||
|
||||
Change the position of the ocp_if structure to match the template.
|
||||
|
||||
Remove unneeded comma at the end of address space flag field.
|
||||
|
||||
Remove USER_SDMA since this ocp link is only from the l3_main_1
|
||||
path that is accessible only from the MPU in that case and not
|
||||
the SDMA.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 27 +++++++++++++--------------
|
||||
1 files changed, 13 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
index 316e922..94c0b60 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -216,6 +216,12 @@ static struct omap_hwmod omap44xx_l3_instr_hwmod = {
|
||||
};
|
||||
|
||||
/* l3_main_1 interface data */
|
||||
+static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
|
||||
+ { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
|
||||
+ { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
|
||||
+ { .irq = -1 }
|
||||
+};
|
||||
+
|
||||
/* dsp -> l3_main_1 */
|
||||
static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
|
||||
.master = &omap44xx_dsp_hwmod,
|
||||
@@ -264,18 +270,11 @@ static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
|
||||
.user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
};
|
||||
|
||||
-/* L3 target configuration and error log registers */
|
||||
-static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = {
|
||||
- { .irq = 9 + OMAP44XX_IRQ_GIC_START },
|
||||
- { .irq = 10 + OMAP44XX_IRQ_GIC_START },
|
||||
- { .irq = -1 }
|
||||
-};
|
||||
-
|
||||
static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x44000000,
|
||||
.pa_end = 0x44000fff,
|
||||
- .flags = ADDR_TYPE_RT,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
},
|
||||
{ }
|
||||
};
|
||||
@@ -286,7 +285,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
|
||||
.slave = &omap44xx_l3_main_1_hwmod,
|
||||
.clk = "l3_div_ck",
|
||||
.addr = omap44xx_l3_main_1_addrs,
|
||||
- .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+ .user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* l3_main_1 slave ports */
|
||||
@@ -303,9 +302,9 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
|
||||
static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
|
||||
.name = "l3_main_1",
|
||||
.class = &omap44xx_l3_hwmod_class,
|
||||
- .mpu_irqs = omap44xx_l3_targ_irqs,
|
||||
.slaves = omap44xx_l3_main_1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
|
||||
+ .mpu_irqs = omap44xx_l3_main_1_irqs,
|
||||
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
|
||||
};
|
||||
|
||||
@@ -354,7 +353,7 @@ static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x44800000,
|
||||
.pa_end = 0x44801fff,
|
||||
- .flags = ADDR_TYPE_RT,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
},
|
||||
{ }
|
||||
};
|
||||
@@ -365,7 +364,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
|
||||
.slave = &omap44xx_l3_main_2_hwmod,
|
||||
.clk = "l3_div_ck",
|
||||
.addr = omap44xx_l3_main_2_addrs,
|
||||
- .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+ .user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* l4_cfg -> l3_main_2 */
|
||||
@@ -409,7 +408,7 @@ static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
|
||||
{
|
||||
.pa_start = 0x45000000,
|
||||
.pa_end = 0x45000fff,
|
||||
- .flags = ADDR_TYPE_RT,
|
||||
+ .flags = ADDR_TYPE_RT
|
||||
},
|
||||
{ }
|
||||
};
|
||||
@@ -420,7 +419,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
|
||||
.slave = &omap44xx_l3_main_3_hwmod,
|
||||
.clk = "l3_div_ck",
|
||||
.addr = omap44xx_l3_main_3_addrs,
|
||||
- .user = OCP_USER_MPU | OCP_USER_SDMA,
|
||||
+ .user = OCP_USER_MPU,
|
||||
};
|
||||
|
||||
/* l3_main_2 -> l3_main_3 */
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
From 27107815284e473d39b81df2ee65c1141f60a6cc Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Sat, 9 Jul 2011 19:14:28 -0600
|
||||
Subject: [PATCH 045/149] OMAP4: hwmod data: Remove un-needed parens
|
||||
|
||||
A couple of parens were added around some flags.
|
||||
|
||||
Remove them, since they are not needed and not used
|
||||
for any other hwmods.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
index 94c0b60..7eed6a2 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -3736,7 +3736,7 @@ static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
|
||||
static struct omap_hwmod omap44xx_mpu_hwmod = {
|
||||
.name = "mpu",
|
||||
.class = &omap44xx_mpu_hwmod_class,
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
.mpu_irqs = omap44xx_mpu_irqs,
|
||||
.main_clk = "dpll_mpu_m2_ck",
|
||||
.prcm = {
|
||||
@@ -4750,7 +4750,7 @@ static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
|
||||
static struct omap_hwmod omap44xx_uart3_hwmod = {
|
||||
.name = "uart3",
|
||||
.class = &omap44xx_uart_hwmod_class,
|
||||
- .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
|
||||
+ .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
|
||||
.mpu_irqs = omap44xx_uart3_irqs,
|
||||
.sdma_reqs = omap44xx_uart3_sdma_reqs,
|
||||
.main_clk = "uart3_fck",
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
-218
@@ -1,218 +0,0 @@
|
||||
From b3ef885514cc4b31d763b09dd78f26e2134c47c5 Mon Sep 17 00:00:00 2001
|
||||
From: Benoit Cousson <b-cousson@ti.com>
|
||||
Date: Sat, 9 Jul 2011 19:14:28 -0600
|
||||
Subject: [PATCH 046/149] OMAP4: hwmod data: Fix bad alignement
|
||||
|
||||
Fix .prcm alignement and usb_otg_hs class and hwmod structures.
|
||||
|
||||
Add a couple of more potential hwmods in the comment.
|
||||
Remove hsi, since it is already included in the data.
|
||||
|
||||
Remove one blank line.
|
||||
|
||||
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
|
||||
Cc: Paul Walmsley <paul@pwsan.com>
|
||||
Signed-off-by: Paul Walmsley <paul@pwsan.com>
|
||||
---
|
||||
arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 45 ++++++++++++++-------------
|
||||
1 files changed, 23 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
index 7eed6a2..1975b05 100644
|
||||
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
|
||||
@@ -632,7 +632,9 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
|
||||
* gpmc
|
||||
* gpu
|
||||
* hdq1w
|
||||
- * hsi
|
||||
+ * mcasp
|
||||
+ * mpu_c0
|
||||
+ * mpu_c1
|
||||
* ocmc_ram
|
||||
* ocp2scp_usb_phy
|
||||
* ocp_wp_noc
|
||||
@@ -740,7 +742,7 @@ static struct omap_hwmod omap44xx_aess_hwmod = {
|
||||
.mpu_irqs = omap44xx_aess_irqs,
|
||||
.sdma_reqs = omap44xx_aess_sdma_reqs,
|
||||
.main_clk = "aess_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL,
|
||||
},
|
||||
@@ -769,7 +771,7 @@ static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
|
||||
static struct omap_hwmod omap44xx_bandgap_hwmod = {
|
||||
.name = "bandgap",
|
||||
.class = &omap44xx_bandgap_hwmod_class,
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
|
||||
},
|
||||
@@ -828,7 +830,7 @@ static struct omap_hwmod omap44xx_counter_32k_hwmod = {
|
||||
.class = &omap44xx_counter_hwmod_class,
|
||||
.flags = HWMOD_SWSUP_SIDLE,
|
||||
.main_clk = "sys_32k_ck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL,
|
||||
},
|
||||
@@ -1004,7 +1006,7 @@ static struct omap_hwmod omap44xx_dmic_hwmod = {
|
||||
.mpu_irqs = omap44xx_dmic_irqs,
|
||||
.sdma_reqs = omap44xx_dmic_sdma_reqs,
|
||||
.main_clk = "dmic_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL,
|
||||
},
|
||||
@@ -2094,7 +2096,7 @@ static struct omap_hwmod omap44xx_hsi_hwmod = {
|
||||
.class = &omap44xx_hsi_hwmod_class,
|
||||
.mpu_irqs = omap44xx_hsi_irqs,
|
||||
.main_clk = "hsi_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL,
|
||||
},
|
||||
@@ -2391,7 +2393,7 @@ static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
|
||||
.flags = HWMOD_INIT_NO_RESET,
|
||||
.rst_lines = omap44xx_ipu_c0_resets,
|
||||
.rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
|
||||
},
|
||||
@@ -2406,7 +2408,7 @@ static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
|
||||
.flags = HWMOD_INIT_NO_RESET,
|
||||
.rst_lines = omap44xx_ipu_c1_resets,
|
||||
.rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
|
||||
},
|
||||
@@ -2421,7 +2423,7 @@ static struct omap_hwmod omap44xx_ipu_hwmod = {
|
||||
.rst_lines = omap44xx_ipu_resets,
|
||||
.rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
|
||||
.main_clk = "ipu_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL,
|
||||
.rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL,
|
||||
@@ -2507,7 +2509,7 @@ static struct omap_hwmod omap44xx_iss_hwmod = {
|
||||
.mpu_irqs = omap44xx_iss_irqs,
|
||||
.sdma_reqs = omap44xx_iss_sdma_reqs,
|
||||
.main_clk = "iss_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL,
|
||||
},
|
||||
@@ -2687,7 +2689,7 @@ static struct omap_hwmod omap44xx_kbd_hwmod = {
|
||||
.class = &omap44xx_kbd_hwmod_class,
|
||||
.mpu_irqs = omap44xx_kbd_irqs,
|
||||
.main_clk = "kbd_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL,
|
||||
},
|
||||
@@ -2751,7 +2753,7 @@ static struct omap_hwmod omap44xx_mailbox_hwmod = {
|
||||
.name = "mailbox",
|
||||
.class = &omap44xx_mailbox_hwmod_class,
|
||||
.mpu_irqs = omap44xx_mailbox_irqs,
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL,
|
||||
},
|
||||
@@ -3133,7 +3135,7 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
|
||||
.mpu_irqs = omap44xx_mcpdm_irqs,
|
||||
.sdma_reqs = omap44xx_mcpdm_sdma_reqs,
|
||||
.main_clk = "mcpdm_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL,
|
||||
},
|
||||
@@ -3430,7 +3432,6 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
|
||||
};
|
||||
|
||||
/* mmc1 */
|
||||
-
|
||||
static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
|
||||
{ .irq = 83 + OMAP44XX_IRQ_GIC_START },
|
||||
{ .irq = -1 }
|
||||
@@ -3481,7 +3482,7 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
|
||||
.mpu_irqs = omap44xx_mmc1_irqs,
|
||||
.sdma_reqs = omap44xx_mmc1_sdma_reqs,
|
||||
.main_clk = "mmc1_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
|
||||
},
|
||||
@@ -3540,7 +3541,7 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
|
||||
.mpu_irqs = omap44xx_mmc2_irqs,
|
||||
.sdma_reqs = omap44xx_mmc2_sdma_reqs,
|
||||
.main_clk = "mmc2_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
|
||||
},
|
||||
@@ -3594,7 +3595,7 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
|
||||
.mpu_irqs = omap44xx_mmc3_irqs,
|
||||
.sdma_reqs = omap44xx_mmc3_sdma_reqs,
|
||||
.main_clk = "mmc3_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL,
|
||||
},
|
||||
@@ -3647,7 +3648,7 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
|
||||
|
||||
.sdma_reqs = omap44xx_mmc4_sdma_reqs,
|
||||
.main_clk = "mmc4_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL,
|
||||
},
|
||||
@@ -3699,7 +3700,7 @@ static struct omap_hwmod omap44xx_mmc5_hwmod = {
|
||||
.mpu_irqs = omap44xx_mmc5_irqs,
|
||||
.sdma_reqs = omap44xx_mmc5_sdma_reqs,
|
||||
.main_clk = "mmc5_fck",
|
||||
- .prcm = {
|
||||
+ .prcm = {
|
||||
.omap4 = {
|
||||
.clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL,
|
||||
},
|
||||
@@ -4835,8 +4836,8 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
|
||||
};
|
||||
|
||||
static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
|
||||
- .name = "usb_otg_hs",
|
||||
- .sysc = &omap44xx_usb_otg_hs_sysc,
|
||||
+ .name = "usb_otg_hs",
|
||||
+ .sysc = &omap44xx_usb_otg_hs_sysc,
|
||||
};
|
||||
|
||||
/* usb_otg_hs */
|
||||
@@ -4890,7 +4891,7 @@ static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
|
||||
},
|
||||
},
|
||||
.opt_clks = usb_otg_hs_opt_clks,
|
||||
- .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
|
||||
+ .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
|
||||
.slaves = omap44xx_usb_otg_hs_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
|
||||
.masters = omap44xx_usb_otg_hs_masters,
|
||||
--
|
||||
1.7.2.5
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user