- Submit bcm-bt-firmware
- Submit bme-rx-51-bin
- Submit contextkit-maemo-battery-rx51-bin
- Submit i2c-tools
- Submit kernel-adaptation-n900
- Submit libcal-rx-51-bin
- Submit liblocation-headers
- Submit libmlocknice
- Submit libppu-bin
- Submit libwl1251-bin
- Submit location-adaptation-rx-51
- Submit mkinitrd
- Submit n900-camera-firmware
- Submit nokia-n900-configs
- Submit nokia-usb-networking
- Submit pattern-n900
- Submit patterns-n900
- Submit policy-settings-basic-n900
- Submit pulseaudio-settings-n900
- Submit sysinfod-rx51
- Submit ti-wl1251-firmware
- Submit u-boot
- Submit udev-rules-n900
- Submit usb-moded-config-n900
- Submit wl1251-cal-bin
Submit package nemo:devel:...:omap3:n900 / bcm-bt-firmware (revision 1) to package nemo:testin...:omap3:n900 / bcm-bt-firmware
[-] [+] | Added | bcm-bt-firmware.changes |
[-] [+] | Added | bcm-bt-firmware.spec ^ |
Added | bcm-bt-firmware-0.21rc3.tar.bz2 ^ | |
[-] [+] | Added | bcm-bt-firmware.yaml ^ |
@@ -0,0 +1,15 @@ +Name: bcm-bt-firmware +Summary: Firmware for the BCM BT chip +Version: 0.21rc3 +Release: 0 +Group: System/Libraries +License: Nokia Proprietary +BuildArch: noarch +Sources: + - "%{name}-%{version}.tar.bz2" +Description: | + Firmware image for the BCM bluetooth chip. Firmware image is needed to boot up + bluetooth chip that is found in Nokia Internet Tablets. + +Configure: none +Builder: none |
Submit package nemo:devel:hw:ti:omap3:n900 / bme-rx-51-bin (revision 1) to package nemo:testing...i:omap3:n900 / bme-rx-51-bin
[-] [+] | Added | bme-rx-51-bin.changes |
[-] [+] | Added | bme-rx-51-bin.spec ^ |
Added | bme-rx-51-bin-0.8.55-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | bme-rx-51-bin.service ^ |
@@ -0,0 +1,15 @@ +[Unit] +Description=BME RX-51 +Requires=dsme.service +After=dsme.service + +[Service] +Environment=DSME_SOCKFILE=/run/dsme.socket +#ExecStartPre=-/sbin/rmmod bq27x00_battery +ExecStart=/usr/sbin/bme_RX-51_start.sh +#ExecStartPost=/bin/sleep 5 +#ExecStartPost=-/sbin/modprobe bq27x00_battery +Restart=always + +[Install] +WantedBy=multi-user.target | ||
[-] [+] | Added | bme-rx-51-bin.yaml ^ |
@@ -0,0 +1,47 @@ +Name: bme-rx-51-bin +Summary: BME binary +Version: 0.8.55 +Release: 0 +Group: System/Daemons +License: Nokia Proprietary +Description: | + BME (Battery Management Entity) binary for Nokia N900 +ExclusiveArch: "%arm" + +Provides: + - bme + - bme-rx-51 +Sources: + - "%{name}-%{version}-armv7hl.tar.bz2" + - "libbmeipc-bin-%{version}-armv7hl.tar.bz2" + - "license.txt" + - "%{name}.service" + - "bme_RX-51_start.sh" + +Requires: + # DSME is required in .service file as well as in the startup script + # pre charging part. + - dsme + +SetupOptions: "-q -a 1 -n %{name}-%{version}-armv7hl" +Configure: none +Builder: none + +Files: + - "%{_sbindir}/bme_RX-51" + - "%{_sbindir}/bme_RX-51_start.sh" + - "%doc license.txt" + - "/lib/systemd/system/%{name}.service" + - "/lib/systemd/system/multi-user.target.wants/%{name}.service" + +SubPackages: + - Name: libbmeipc-bin + AsWholeName: yes + Summary: Shared library for communication with Battery Management Entity + Group: System/Libraries + Provides: + - libbmeipc + Description: shared library for communication with Battery Management Entity + Files: + - "%{_libdir}/libbmeipc.so.0" + - "%doc license.txt" | ||
[-] [+] | Added | bme_RX-51_start.sh ^ |
@@ -0,0 +1,102 @@ +#!/bin/sh +service=bme +proc=bme_RX-51 + +SYSFS_BACKLIGHT_BRIGHTNESS="/sys/class/backlight/acx565akm/brightness" +SYSFS_VBUS="/sys/class/i2c-adapter/i2c-1/1-0048/twl4030_usb/vbus" + +SYSFS_LED_ENGINE_BASE="/sys/class/i2c-adapter/i2c-2/2-0032" +SYSFS_LED_BASE="/sys/class/leds/lp5523:channel" + +ledpattern_off() +{ + echo "disabled" > "$SYSFS_LED_ENGINE_BASE/engine1_mode" + echo "disabled" > "$SYSFS_LED_ENGINE_BASE/engine2_mode" + echo 0 > ""$SYSFS_LED_BASE"6/brightness" + echo 0 > ""$SYSFS_LED_BASE"5/brightness" + echo 0 > ""$SYSFS_LED_BASE"4/brightness" +} + +ledpattern_on() +{ + # Clear LED states + ledpattern_off + + # Set yellow light pattern + echo "load" > "$SYSFS_LED_ENGINE_BASE/engine1_mode" + echo "000001100" > "$SYSFS_LED_ENGINE_BASE/engine1_leds" + echo "9d804000427f0d7f7f007f0042000000" > "$SYSFS_LED_ENGINE_BASE/engine1_load" + + echo "load" > "$SYSFS_LED_ENGINE_BASE/engine2_mode" + echo "000000000" > "$SYSFS_LED_ENGINE_BASE/engine2_leds" + echo "9d800000" > "$SYSFS_LED_ENGINE_BASE/engine2_load" + + # Run the pattern + echo "run" > "$SYSFS_LED_ENGINE_BASE/engine2_mode" + echo "run" > "$SYSFS_LED_ENGINE_BASE/engine1_mode" + + echo 50 > ""$SYSFS_LED_BASE"6/brightness" + echo 50 > ""$SYSFS_LED_BASE"5/brightness" + echo 0 > ""$SYSFS_LED_BASE"4/brightness" +} + +# Handles case of empty battery +precharge() +{ + RETV=0 + modprobe isp1704_charger + modprobe g_nokia + + if [ $(cat $SYSFS_VBUS) = "on" ]; then + #echo "BME pre-charge: " + + # Set backlight brightness to minimum to minimize current drain + ORIG_BRIGHTNESS=`cat $SYSFS_BACKLIGHT_BRIGHTNESS` + echo 0 > $SYSFS_BACKLIGHT_BRIGHTNESS + + /usr/sbin/waitfordsme &> /dev/null + if [ $? -ne 0 ]; then + echo "BME pre-charge: waitfordsme failed!" + killall -q dsme + return 1 + fi + + # Start yellow blinking led to notify user about charging + ledpattern_on + + # Start BME in pre-charge mode + /usr/sbin/bme_RX-51 -b + case $? in + 0) + echo $ORIG_BRIGHTNESS > $SYSFS_BACKLIGHT_BRIGHTNESS + RETV=0 + ;; + 2) + # BME decided that poweroff is wiser + echo "BME pre-charge -> power off!" + RETV=1 + ;; + *) + # Shouldn't happen + echo "BME pre-charge: some error, go on nevertheless..." + echo $ORIG_BRIGHTNESS > $SYSFS_BACKLIGHT_BRIGHTNESS + RETV=0 + ;; + esac + + # Turn off blinking led + ledpattern_off + fi + + return $RETV +} + +start() { + exec /usr/sbin/bme_RX-51 + return $? +} + +precharge +[ $? -eq 0 ] && start + +exit $? | ||
Added | libbmeipc-bin-0.8.55-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + |
Submit package nemo:deve...ap3:n900 / contextki...rx51-bin (revision 1) to package nemo:test...ap3:n900 / contextki...rx51-bin
[-] [+] | Added | contextkit-maemo-battery-rx51-bin.changes |
[-] [+] | Added | contextkit-maemo-battery-rx51-bin.spec ^ |
[-] [+] | Added | includepath-fix.patch ^ |
@@ -0,0 +1,29 @@ +diff --git a/libcontextsubscriber-plugins/battery/Makefile.am b/libcontextsubscriber-plugins/battery/Makefile.am +index d482b46..57b1033 100644 +--- a/libcontextsubscriber-plugins/battery/Makefile.am ++++ b/libcontextsubscriber-plugins/battery/Makefile.am +@@ -12,15 +12,15 @@ libbattery_rx51_la_SOURCES = batteryplugin.cpp \ + AM_CXXFLAGS = -I$(top_srcdir)/common $(QtCore_CFLAGS) \ + $(CTXTSUBS_CFLAGS) \ + '-DCONTEXT_LOG_MODULE_NAME="batteryplugin"' \ +- -I/usr/include \ +- -I/usr/include/hw \ +- -I/usr/include/nos \ +- -I/usr/include/adc \ +- -I/usr/include/em \ +- -I/usr/include/em/bb5 \ +- -I/usr/include/em/hal \ +- -I/usr/include/RX-51 \ +- -I/usr/include/osso ++ -I/usr/include/bme \ ++ -I/usr/include/bme/hw \ ++ -I/usr/include/bme/nos \ ++ -I/usr/include/bme/adc \ ++ -I/usr/include/bme/em \ ++ -I/usr/include/bme/em/bb5 \ ++ -I/usr/include/bme/em/hal \ ++ -I/usr/include/bme/RX-51 \ ++ -I/usr/include/bme/osso + + # module: Libtool shouldn't complain about not having "lib" prefix + # avoid-version: Don't add version numbers after .so | ||
[-] [+] | Added | boss.conf ^ |
@@ -0,0 +1,2 @@ +[checks] +check_package_is_complete_sources = warn | ||
Added | contextkit-maemo-battery-rx51-0.7.14.tar.bz2 ^ | |
Added | contextkit-maemo-battery-rx51-bin-0.7.14-armv7hl.tar.bz2 ^ | |
Added | contextkit-maemo-battery-rx51-bin-0.7.14-armv7l.tar.bz2 ^ | |
[-] [+] | Added | contextkit-maemo-battery-rx51-bin.yaml ^ |
@@ -0,0 +1,21 @@ +Name: contextkit-maemo-battery-rx51-bin +Summary: ContextKit BatteryPlugin for MeeGo N900 +Version: 0.7.14 +Release: 0 +Group: System/Context Framework +License: GPLv2 +Sources: + - "%{name}-%{version}-armv7hl.tar.bz2" + - "contextkit-maemo-battery-rx51-%{version}.tar.bz2" + - "includepath-fix.patch" +Description: | + This is a ContextKit battery-plugin for the Nokia N900. A library for + reading battery data and providing it to the application layer. + This package only contains the binaries. +ExclusiveArch: "%arm" +Requires: + - "bme-rx-51" + +SetupOptions: -q -n %{name}-%{version}-armv7hl +Configure: none +Builder: none |
Submit package nemo:devel:hw:ti:omap3:n900 / i2c-tools (revision 1) to package nemo:testing:hw:ti:omap3:n900 / i2c-tools
[-] [+] | Added | i2c-tools.changes |
[-] [+] | Added | i2c-tools.spec ^ |
Added | i2c-tools-3.0.3.tar.bz2 ^ | |
[-] [+] | Added | i2c-tools.yaml ^ |
@@ -0,0 +1,25 @@ +Name: i2c-tools +Summary: Heterogeneous set of I2C tools for Linux +Version: 3.0.3 +Release: 1 +Group: System/Libraries +License: GPLv2+ +Sources: + - http://dl.lm-sensors.org/i2c-tools/releases/%{name}-%{version}.tar.bz2 +Description: | + This package contains a heterogeneous set of I2C tools for Linux: a bus + probing tool, a chip dumper, register-level access helpers, EEPROM + decoding scripts, and more. + +Configure: none +Builder: none +SubPackages: + - Name: libi2c-devel + AsWholeName: yes + Summary: Userspace I2C programming library development files + Group: System/Libraries + Description: | + I2C devices are usually controlled by a kernel driver. Using this + library it is also possible to access all devices on an adapter + from userspace and without the knowledge of Linux kernel internals. + |
Submit package nemo:deve...ap3:n900 / kernel-ad...ion-n900 (revision 2) to package nemo:test...ap3:n900 / kernel-ad...ion-n900
[-] [+] | Added | kernel.changes |
[-] [+] | Added | kernel-adaptation-n900.spec ^ |
[-] [+] | Added | 000-kcflag-mno-unaligned-access.patch ^ |
@@ -0,0 +1,11 @@ +--- linux-3.1/Makefile 2011-10-24 18:10:05.000000000 +1100 ++++ b/Makefile 2011-12-24 16:06:38.848284875 +1100 +@@ -640,6 +640,8 @@ + KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO + endif + ++KBUILD_CFLAGS += -mno-unaligned-access ++ + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments + # But warn user when we do so + warn-assign = \ | ||
[-] [+] | Added | 0001-mmc-Adjust-timings-for-power-ramping-up.patch ^ |
@@ -0,0 +1,34 @@ +From ceb13ae8156fd0b1fc6a27b352855fc02f651928 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov <dmitry.rozhkov@jollamobile.com> +Date: Fri, 10 Aug 2012 15:07:19 +0300 +Subject: [PATCH] mmc: Adjust timings for power ramping up + +According to p6.4.1.1 of Physical Layer Simplified Specification +Ver3.01 the "host needs to keep power line level less than 0.5V and +more than 1ms before power ramp up". This patch adds a delay +of 10ms before powering up the host. +--- + drivers/mmc/core/core.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c +index 57dcf8f..1c110f3 100644 +--- a/drivers/mmc/core/core.c ++++ b/drivers/mmc/core/core.c +@@ -899,6 +899,13 @@ static void mmc_power_up(struct mmc_host *host) + { + int bit; + ++ /* ++ * According to p6.4.1.1 of Physical Layer Simplified Specification ++ * Ver3.01 the "host needs to keep power line level less than 0.5V and ++ * more than 1ms before power ramp up". ++ */ ++ mmc_delay(10); ++ + /* If ocr is set, we use it */ + if (host->ocr) + bit = ffs(host->ocr) - 1; +-- +1.7.9.5 + | ||
[-] [+] | Added | linux-2.6-38-leds-leds-lp5523-modify-the-way-of-setting-led-devic.patch ^ |
@@ -0,0 +1,49 @@ +From 8f333cf8ceec2d2f42a5ca42e4330242ef2770d9 Mon Sep 17 00:00:00 2001 +From: Samu Onkalo <samu.p.onkalo@nokia.com> +Date: Wed, 12 Jan 2011 16:59:17 -0800 +Subject: [PATCH 29/42] leds: leds-lp5523: modify the way of setting led device name + +Currently all leds channels begins with string lp5523. Patch adds a +possibility to provide name via platform data. This makes it possible to +have several chips without overlapping sysfs names. + +Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> +Cc: Arun Murthy <arun.murthy@stericsson.com> +Cc: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Cc: Richard Purdie <rpurdie@rpsys.net> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +--- + drivers/leds/leds-lp5523.c | 3 ++- + include/linux/leds-lp5523.h | 1 + + 2 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c +index 0cc4ead..6cb4160 100644 +--- a/drivers/leds/leds-lp5523.c ++++ b/drivers/leds/leds-lp5523.c +@@ -870,7 +870,8 @@ static int __init lp5523_init_led(struct lp5523_led *led, struct device *dev, + return -EINVAL; + } + +- snprintf(name, 32, "lp5523:channel%d", chan); ++ snprintf(name, sizeof(name), "%s:channel%d", ++ pdata->label ?: "lp5523", chan); + + led->cdev.name = name; + led->cdev.brightness_set = lp5523_set_brightness; +diff --git a/include/linux/leds-lp5523.h b/include/linux/leds-lp5523.h +index 7967476..2694289 100644 +--- a/include/linux/leds-lp5523.h ++++ b/include/linux/leds-lp5523.h +@@ -42,6 +42,7 @@ struct lp5523_platform_data { + int (*setup_resources)(void); + void (*release_resources)(void); + void (*enable)(bool state); ++ const char *label; + }; + + #endif /* __LINUX_LP5523_H */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-38-leds-lp5523-fix-circular-locking.patch ^ |
@@ -0,0 +1,165 @@ +From 06bd5d32cf01a24561a45e274fe3760117922b8b Mon Sep 17 00:00:00 2001 +From: Samu Onkalo <samu.p.onkalo@nokia.com> +Date: Wed, 12 Jan 2011 16:59:18 -0800 +Subject: [PATCH 30/42] leds: lp5523: fix circular locking + +Driver contained possibility for circular locking. + +One lock is held by sysfs-core and another one by the driver itself. This +happened when the driver created or removed sysfs entries dynamically. +There is no real need to do those operations. Now all the sysfs entries +are created at probe and removed at removal. Engine load and mux +configuration sysfs entries are now visible all the time. However, access +to the entries fails if the engine is disabled or running. + +Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com> +Cc: Arun Murthy <arun.murthy@stericsson.com> +Reviewed-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Cc: Richard Purdie <rpurdie@rpsys.net> +Signed-off-by: Andrew Morton <akpm@linux-foundation.org> +Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> +--- + drivers/leds/leds-lp5523.c | 56 ++++++++++++------------------------------- + 1 files changed, 16 insertions(+), 40 deletions(-) + +diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c +index 6cb4160..d0c4068 100644 +--- a/drivers/leds/leds-lp5523.c ++++ b/drivers/leds/leds-lp5523.c +@@ -105,7 +105,6 @@ + #define SHIFT_MASK(id) (((id) - 1) * 2) + + struct lp5523_engine { +- const struct attribute_group *attributes; + int id; + u8 mode; + u8 prog_page; +@@ -403,14 +402,23 @@ static ssize_t store_engine_leds(struct device *dev, + struct i2c_client *client = to_i2c_client(dev); + struct lp5523_chip *chip = i2c_get_clientdata(client); + u16 mux = 0; ++ ssize_t ret; + + if (lp5523_mux_parse(buf, &mux, len)) + return -EINVAL; + ++ mutex_lock(&chip->lock); ++ ret = -EINVAL; ++ if (chip->engines[nr - 1].mode != LP5523_CMD_LOAD) ++ goto leave; ++ + if (lp5523_load_mux(&chip->engines[nr - 1], mux)) +- return -EINVAL; ++ goto leave; + +- return len; ++ ret = len; ++leave: ++ mutex_unlock(&chip->lock); ++ return ret; + } + + #define store_leds(nr) \ +@@ -556,7 +564,11 @@ static int lp5523_do_store_load(struct lp5523_engine *engine, + + mutex_lock(&chip->lock); + +- ret = lp5523_load_program(engine, pattern); ++ if (engine->mode == LP5523_CMD_LOAD) ++ ret = lp5523_load_program(engine, pattern); ++ else ++ ret = -EINVAL; ++ + mutex_unlock(&chip->lock); + + if (ret) { +@@ -737,37 +749,18 @@ static struct attribute *lp5523_attributes[] = { + &dev_attr_engine2_mode.attr, + &dev_attr_engine3_mode.attr, + &dev_attr_selftest.attr, +- NULL +-}; +- +-static struct attribute *lp5523_engine1_attributes[] = { + &dev_attr_engine1_load.attr, + &dev_attr_engine1_leds.attr, +- NULL +-}; +- +-static struct attribute *lp5523_engine2_attributes[] = { + &dev_attr_engine2_load.attr, + &dev_attr_engine2_leds.attr, +- NULL +-}; +- +-static struct attribute *lp5523_engine3_attributes[] = { + &dev_attr_engine3_load.attr, + &dev_attr_engine3_leds.attr, +- NULL + }; + + static const struct attribute_group lp5523_group = { + .attrs = lp5523_attributes, + }; + +-static const struct attribute_group lp5523_engine_group[] = { +- {.attrs = lp5523_engine1_attributes }, +- {.attrs = lp5523_engine2_attributes }, +- {.attrs = lp5523_engine3_attributes }, +-}; +- + static int lp5523_register_sysfs(struct i2c_client *client) + { + struct device *dev = &client->dev; +@@ -788,10 +781,6 @@ static void lp5523_unregister_sysfs(struct i2c_client *client) + + sysfs_remove_group(&dev->kobj, &lp5523_group); + +- for (i = 0; i < ARRAY_SIZE(chip->engines); i++) +- if (chip->engines[i].mode == LP5523_CMD_LOAD) +- sysfs_remove_group(&dev->kobj, &lp5523_engine_group[i]); +- + for (i = 0; i < chip->num_leds; i++) + sysfs_remove_group(&chip->leds[i].cdev.dev->kobj, + &lp5523_led_attribute_group); +@@ -802,10 +791,6 @@ static void lp5523_unregister_sysfs(struct i2c_client *client) + /*--------------------------------------------------------------*/ + static int lp5523_set_mode(struct lp5523_engine *engine, u8 mode) + { +- /* engine to chip */ +- struct lp5523_chip *chip = engine_to_lp5523(engine); +- struct i2c_client *client = chip->client; +- struct device *dev = &client->dev; + int ret = 0; + + /* if in that mode already do nothing, except for run */ +@@ -817,18 +802,10 @@ static int lp5523_set_mode(struct lp5523_engine *engine, u8 mode) + } else if (mode == LP5523_CMD_LOAD) { + lp5523_set_engine_mode(engine, LP5523_CMD_DISABLED); + lp5523_set_engine_mode(engine, LP5523_CMD_LOAD); +- +- ret = sysfs_create_group(&dev->kobj, engine->attributes); +- if (ret) +- return ret; + } else if (mode == LP5523_CMD_DISABLED) { + lp5523_set_engine_mode(engine, LP5523_CMD_DISABLED); + } + +- /* remove load attribute from sysfs if not in load mode */ +- if (engine->mode == LP5523_CMD_LOAD && mode != LP5523_CMD_LOAD) +- sysfs_remove_group(&dev->kobj, engine->attributes); +- + engine->mode = mode; + + return ret; +@@ -845,7 +822,6 @@ static int __init lp5523_init_engine(struct lp5523_engine *engine, int id) + engine->engine_mask = LP5523_ENG_MASK_BASE >> SHIFT_MASK(id); + engine->prog_page = id - 1; + engine->mux_page = id + 2; +- engine->attributes = &lp5523_engine_group[id - 1]; + + return 0; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-RX-51-Add-aic34b_dummy-driver-only-for-the-RX-5.patch ^ |
@@ -0,0 +1,346 @@ +From 53ac540cdcb1b36200bb269cc5fed9d19c2e1c7d Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 29 Jun 2010 14:44:50 +0300 +Subject: [PATCH 18/42] ASoC: RX-51: Add aic34b_dummy driver only for the RX-51 + +Only purpose of this dummy driver is to support a few audio connections +on Nokia RX-51/N900 HW. Currently ASoC framework supports only single audio +codec per card. The RX-51 has two of them since the TLV320AIC34 audio codec +used in RX-51 integrates basically two TLV320AIC33 codecs into a same chip. +These instances are called as AIC34A and AIC34B. The AIC34A is used as an +audio codec and the AIC34B is used kind of audio amplifier and mic bias +driver. + +Ideally features of this driver are supported by the tlv320aic3x codec +driver but as only single instance of it can exist currently, this driver +registers needed features as additional controls and widgets for the card. + +This driver should vanish as soon as the ASoC multi-component framework +maturises and gets integrated into mainline. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/Makefile | 2 +- + sound/soc/omap/aic34b_dummy.c | 260 +++++++++++++++++++++++++++++++++++++++++ + sound/soc/omap/aic34b_dummy.h | 29 +++++ + 3 files changed, 290 insertions(+), 1 deletions(-) + create mode 100644 sound/soc/omap/aic34b_dummy.c + create mode 100644 sound/soc/omap/aic34b_dummy.h + +diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile +index ba9fc65..0a7374f 100644 +--- a/sound/soc/omap/Makefile ++++ b/sound/soc/omap/Makefile +@@ -24,7 +24,7 @@ snd-soc-zoom2-objs := zoom2.o + snd-soc-igep0020-objs := igep0020.o + + obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o +-obj-$(CONFIG_SND_OMAP_SOC_RX51) += snd-soc-rx51.o ++obj-$(CONFIG_SND_OMAP_SOC_RX51) += snd-soc-rx51.o aic34b_dummy.o + obj-$(CONFIG_SND_OMAP_SOC_AMS_DELTA) += snd-soc-ams-delta.o + obj-$(CONFIG_SND_OMAP_SOC_OSK5912) += snd-soc-osk5912.o + obj-$(CONFIG_SND_OMAP_SOC_OVERO) += snd-soc-overo.o +diff --git a/sound/soc/omap/aic34b_dummy.c b/sound/soc/omap/aic34b_dummy.c +new file mode 100644 +index 0000000..bace5fc +--- /dev/null ++++ b/sound/soc/omap/aic34b_dummy.c +@@ -0,0 +1,260 @@ ++/* ++ * aic34b_dummy.c -- Dummy driver for AIC34 block B parts used in Nokia RX51 ++ * ++ * Purpose for this driver is to cover few audio connections on Nokia RX51 HW ++ * which are connected into block B of TLV320AIC34 dual codec. ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * ++ * 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 ++ * ++ * TODO: ++ * - Get rid of this driver, at least when ASoC multi-component is merged into ++ * mainline. ++ * This driver is hacked only for Nokia RX51 HW. ++ */ ++ ++#include <linux/module.h> ++#include <linux/errno.h> ++#include <linux/device.h> ++#include <linux/i2c.h> ++#include <sound/soc.h> ++#include <sound/soc-dapm.h> ++#include <sound/tlv.h> ++ ++#include "../codecs/tlv320aic3x.h" ++ ++struct i2c_client *aic34b_client; ++ ++static int aic34b_read(struct i2c_client *client, unsigned int reg) ++{ ++ int val; ++ ++ val = i2c_smbus_read_byte_data(client, reg); ++ ++ return val; ++} ++ ++static int aic34b_write(struct i2c_client *client, unsigned int reg, ++ u8 value) ++{ ++ u8 data[2]; ++ ++ data[0] = reg & 0xff; ++ data[1] = value & 0xff; ++ ++ return (i2c_master_send(client, data, 2) == 2) ? 0 : -EIO; ++} ++ ++static int aic34b_get_volsw(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct soc_mixer_control *mc = ++ (struct soc_mixer_control *)kcontrol->private_value; ++ unsigned int reg = mc->reg; ++ unsigned int shift = mc->shift; ++ int max = mc->max; ++ unsigned int mask = (1 << fls(max)) - 1; ++ unsigned int invert = mc->invert; ++ int val; ++ ++ if (aic34b_client == NULL) ++ return 0; ++ ++ val = (aic34b_read(aic34b_client, reg) >> shift) & mask; ++ if (invert) ++ val = max - val; ++ ucontrol->value.integer.value[0] = val; ++ ++ return 0; ++} ++ ++static int aic34b_put_volsw(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct soc_mixer_control *mc = ++ (struct soc_mixer_control *)kcontrol->private_value; ++ unsigned int reg = mc->reg; ++ unsigned int shift = mc->shift; ++ int max = mc->max; ++ unsigned int mask = (1 << fls(max)) - 1; ++ unsigned int invert = mc->invert; ++ unsigned int val = (ucontrol->value.integer.value[0] & mask); ++ int val_reg; ++ ++ if (aic34b_client == NULL) ++ return 0; ++ ++ if (invert) ++ val = max - val; ++ ++ val_reg = aic34b_read(aic34b_client, reg); ++ if (((val_reg >> shift) & mask) == val) { ++ return 0; ++ } ++ ++ val_reg &= ~(mask << shift); ++ val_reg |= val << shift; ++ aic34b_write(aic34b_client, reg, val_reg); ++ ++ return 1; ++} ++ ++static int aic34b_bypass_event(struct snd_soc_dapm_widget *w, ++ struct snd_kcontrol *kcontrol, int event) ++{ ++ int val; ++ ++ if (aic34b_client == NULL) ++ return 0; ++ ++ switch (event) { ++ case SND_SOC_DAPM_POST_PMU: ++ /* Connect LINE2R to RADC in differential mode and 0 dB gain */ ++ aic34b_write(aic34b_client, LINE2R_2_RADC_CTRL, 0x80); ++ /* Unmute Right ADC-PGA */ ++ aic34b_write(aic34b_client, RADC_VOL, 0x00); ++ /* Right PGA -> HPLOUT */ ++ val = aic34b_read(aic34b_client, PGAR_2_HPLOUT_VOL); ++ aic34b_write(aic34b_client, PGAR_2_HPLOUT_VOL, val | 0x80); ++ /* Unmute HPLOUT with 1 dB gain */ ++ aic34b_write(aic34b_client, HPLOUT_CTRL, 0x19); ++ /* Unmute HPLCOM with 1 dB gain */ ++ aic34b_write(aic34b_client, HPLCOM_CTRL, 0x19); ++ break; ++ case SND_SOC_DAPM_POST_PMD: ++ /* Disconnect LINE2R from RADC */ ++ aic34b_write(aic34b_client, LINE2R_2_RADC_CTRL, 0xF8); ++ /* Mute Right ADC-PGA */ ++ aic34b_write(aic34b_client, RADC_VOL, 0x80); ++ /* Detach Right PGA from HPLOUT */ ++ val = aic34b_read(aic34b_client, PGAR_2_HPLOUT_VOL); ++ aic34b_write(aic34b_client, PGAR_2_HPLOUT_VOL, val & 0x7f); ++ /* Power down HPLOUT */ ++ aic34b_write(aic34b_client, HPLOUT_CTRL, 0x06); ++ /* Power down HPLCOM */ ++ aic34b_write(aic34b_client, HPLCOM_CTRL, 0x06); ++ break; ++ } ++ | ||
[-] [+] | Added | linux-2.6-ASoC-RX-51-Add-mic-input-to-AV-jack.patch ^ |
@@ -0,0 +1,116 @@ +From 1fb7361fed465b519a714cd39ddd4001e382b390 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 29 Jun 2010 16:01:47 +0300 +Subject: [PATCH 21/42] ASoC: RX-51: Add mic input to AV jack + +Mic input is connected to LINE1L of the AIC34A via ECI_SW2 (name took from +the Maemo 2.6.28 kernel sources) switch. This patch adds the headset feature +to AV jack. Headset is combination of headphone stereo output with mic +input. + +This patch doesn't drive the mic bias so signal will be too weak to be +usable. The mic bias feature will be introduced by another patch. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/rx51.c | 22 ++++++++++++++++++++-- + 1 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index ee9e7cd..bbaaea9 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -43,6 +43,7 @@ + + #define RX51_TVOUT_SEL_GPIO 40 + #define RX51_JACK_DETECT_GPIO 177 ++#define RX51_ECI_SW2_GPIO 182 + /* + * REVISIT: TWL4030 GPIO base in RX-51. Now statically defined to 192. This + * gpio is reserved in arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -53,6 +54,7 @@ enum { + RX51_JACK_DISABLED, + RX51_JACK_TVOUT, /* tv-out with stereo audio */ + RX51_JACK_HP, /* stereo output, no mic */ ++ RX51_JACK_HS, /* stereo output with mic input */ + }; + + static int rx51_spk_func; +@@ -63,9 +65,11 @@ static int rx51_ear_func; + + static void rx51_ext_control(struct snd_soc_codec *codec) + { +- int hp = 0; ++ int hp = 0, mic = 0; + + switch (rx51_jack_func) { ++ case RX51_JACK_HS: ++ mic = 1; + case RX51_JACK_TVOUT: + case RX51_JACK_HP: + hp = 1; +@@ -92,6 +96,10 @@ static void rx51_ext_control(struct snd_soc_codec *codec) + snd_soc_dapm_enable_pin(codec, "Earpiece"); + else + snd_soc_dapm_disable_pin(codec, "Earpiece"); ++ if (mic) ++ snd_soc_dapm_enable_pin(codec, "Mic Jack"); ++ else ++ snd_soc_dapm_disable_pin(codec, "Mic Jack"); + + gpio_set_value(RX51_TVOUT_SEL_GPIO, + rx51_jack_func == RX51_JACK_TVOUT); +@@ -285,6 +293,7 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_LINE("FM Transmitter", NULL), + SND_SOC_DAPM_SPK("Earpiece", NULL), ++ SND_SOC_DAPM_MIC("Mic Jack", NULL), + }; + + static const struct snd_soc_dapm_route audio_map[] = { +@@ -305,11 +314,13 @@ static const struct snd_soc_dapm_route audio_map[] = { + {"34B_LINE2R", NULL, "MONO_LOUT"}, + {"Earpiece", NULL, "34B_HPLOUT"}, + {"Earpiece", NULL, "34B_HPLCOM"}, ++ ++ {"LINE1L", NULL, "Mic Jack"}, + }; + + static const char *spk_function[] = {"Off", "On"}; + static const char *input_function[] = {"ADC", "Digital Mic"}; +-static const char *jack_function[] = {"Off", "TV-OUT", "Headphone"}; ++static const char *jack_function[] = {"Off", "TV-OUT", "Headphone", "Headset"}; + static const char *fmtx_function[] = {"Off", "On"}; + static const char *ear_function[] = {"Off", "On"}; + +@@ -410,6 +421,10 @@ static int __init rx51_soc_init(void) + if (err) + goto err_gpio_tvout_sel; + gpio_direction_output(RX51_TVOUT_SEL_GPIO, 0); ++ err = gpio_request(RX51_ECI_SW2_GPIO, "eci_sw2"); ++ if (err) ++ goto err_gpio_eci_sw2; ++ gpio_direction_output(RX51_ECI_SW2_GPIO, 1); + + rx51_snd_device = platform_device_alloc("soc-audio", -1); + if (!rx51_snd_device) { +@@ -427,6 +442,8 @@ static int __init rx51_soc_init(void) + err2: + platform_device_put(rx51_snd_device); + err1: ++ gpio_free(RX51_ECI_SW2_GPIO); ++err_gpio_eci_sw2: + gpio_free(RX51_TVOUT_SEL_GPIO); + err_gpio_tvout_sel: + +@@ -439,6 +456,7 @@ static void __exit rx51_soc_exit(void) + rx51_av_jack_gpios); + + platform_device_unregister(rx51_snd_device); ++ gpio_free(RX51_ECI_SW2_GPIO); + gpio_free(RX51_TVOUT_SEL_GPIO); + } + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-RX-51-Add-stereo-audio-output-to-AV-jack.patch ^ |
@@ -0,0 +1,120 @@ +From f157a78fa02f8f3083779551724e1b3725273194 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 22 Jun 2010 17:10:39 +0300 +Subject: [PATCH 14/42] ASoC: RX-51: Add stereo audio output to AV jack + +The TPA6130A2 headphone amplifier is used in Nokia N900/RX-51 to drive the +audio output pins in 4-pole multifunction audio-video jack. This patch +implements audio output functionality, extends the control 'Jack Function' +and limits the TPA6130A2 output level. + +Limiting is done because the TPA6130A2 can output very high audio levels to +headphones. A value for the maximum volume is found from the Maemo 2.6.28 +kernel sources. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/Kconfig | 1 + + sound/soc/omap/rx51.c | 28 ++++++++++++++++++++++++++-- + 2 files changed, 27 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig +index a088db6..b592298 100644 +--- a/sound/soc/omap/Kconfig ++++ b/sound/soc/omap/Kconfig +@@ -24,6 +24,7 @@ config SND_OMAP_SOC_RX51 + select OMAP_MCBSP + select SND_OMAP_SOC_MCBSP + select SND_SOC_TLV320AIC3X ++ select SND_SOC_TPA6130A2 + help + Say Y if you want to add support for SoC audio on Nokia RX-51 + hardware. This is also known as Nokia N900 product. +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index 04b5723..1f59fff 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -38,6 +38,7 @@ + #include "omap-mcbsp.h" + #include "omap-pcm.h" + #include "../codecs/tlv320aic3x.h" ++#include "../codecs/tpa6130a2.h" + + #define RX51_TVOUT_SEL_GPIO 40 + #define RX51_JACK_DETECT_GPIO 177 +@@ -49,7 +50,8 @@ + + enum { + RX51_JACK_DISABLED, +- RX51_JACK_TVOUT, /* tv-out */ ++ RX51_JACK_TVOUT, /* tv-out with stereo audio */ ++ RX51_JACK_HP, /* stereo output, no mic */ + }; + + static int rx51_spk_func; +@@ -58,6 +60,15 @@ static int rx51_jack_func; + + static void rx51_ext_control(struct snd_soc_codec *codec) + { ++ int hp = 0; ++ ++ switch (rx51_jack_func) { ++ case RX51_JACK_TVOUT: ++ case RX51_JACK_HP: ++ hp = 1; ++ break; ++ } ++ + if (rx51_spk_func) + snd_soc_dapm_enable_pin(codec, "Ext Spk"); + else +@@ -66,6 +77,10 @@ static void rx51_ext_control(struct snd_soc_codec *codec) + snd_soc_dapm_enable_pin(codec, "DMic"); + else + snd_soc_dapm_disable_pin(codec, "DMic"); ++ if (hp) ++ snd_soc_dapm_enable_pin(codec, "Headphone Jack"); ++ else ++ snd_soc_dapm_disable_pin(codec, "Headphone Jack"); + + gpio_set_value(RX51_TVOUT_SEL_GPIO, + rx51_jack_func == RX51_JACK_TVOUT); +@@ -212,6 +227,7 @@ static struct snd_soc_jack_gpio rx51_av_jack_gpios[] = { + static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { + SND_SOC_DAPM_SPK("Ext Spk", rx51_spk_event), + SND_SOC_DAPM_MIC("DMic", NULL), ++ SND_SOC_DAPM_HP("Headphone Jack", NULL), + }; + + static const struct snd_soc_dapm_route audio_map[] = { +@@ -220,11 +236,16 @@ static const struct snd_soc_dapm_route audio_map[] = { + + {"DMic Rate 64", NULL, "Mic Bias 2V"}, + {"Mic Bias 2V", NULL, "DMic"}, ++ ++ {"Headphone Jack", NULL, "TPA6130A2 Headphone Left"}, ++ {"Headphone Jack", NULL, "TPA6130A2 Headphone Right"}, ++ {"TPA6130A2 Left", NULL, "LLOUT"}, ++ {"TPA6130A2 Right", NULL, "RLOUT"}, + }; + + static const char *spk_function[] = {"Off", "On"}; + static const char *input_function[] = {"ADC", "Digital Mic"}; +-static const char *jack_function[] = {"Off", "TV-OUT"}; ++static const char *jack_function[] = {"Off", "TV-OUT", "Headphone"}; + + static const struct soc_enum rx51_enum[] = { + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(spk_function), spk_function), +@@ -261,6 +282,9 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) + snd_soc_dapm_new_controls(codec, aic34_dapm_widgets, + ARRAY_SIZE(aic34_dapm_widgets)); + ++ tpa6130a2_add_controls(codec); ++ snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); ++ + /* Set up RX-51 specific audio path audio_map */ + snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-RX-51-Add-support-for-FM-transmitter.patch ^ |
@@ -0,0 +1,109 @@ +From e866a364ff2105c6ff3a932306cc2545e0044b18 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 22 Jun 2010 18:11:32 +0300 +Subject: [PATCH 17/42] ASoC: RX-51: Add support for FM transmitter + +Nokia N900/RX-51 has Si4713 FM transmitter which shares the same codec +line-out output than the TPA6130A2 amplifier. Add route to transmitter +and kcontrol 'FMTX Function' which used to indicate to DAPM when the route +to FM transmitter should be active. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/rx51.c | 35 +++++++++++++++++++++++++++++++++++ + 1 files changed, 35 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index 1f59fff..a85194a 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -57,6 +57,7 @@ enum { + static int rx51_spk_func; + static int rx51_dmic_func; + static int rx51_jack_func; ++static int rx51_fmtx_func; + + static void rx51_ext_control(struct snd_soc_codec *codec) + { +@@ -81,6 +82,10 @@ static void rx51_ext_control(struct snd_soc_codec *codec) + snd_soc_dapm_enable_pin(codec, "Headphone Jack"); + else + snd_soc_dapm_disable_pin(codec, "Headphone Jack"); ++ if (rx51_fmtx_func) ++ snd_soc_dapm_enable_pin(codec, "FM Transmitter"); ++ else ++ snd_soc_dapm_disable_pin(codec, "FM Transmitter"); + + gpio_set_value(RX51_TVOUT_SEL_GPIO, + rx51_jack_func == RX51_JACK_TVOUT); +@@ -212,6 +217,28 @@ static int rx51_set_jack(struct snd_kcontrol *kcontrol, + return 1; + } + ++static int rx51_get_fmtx(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ ucontrol->value.integer.value[0] = rx51_fmtx_func; ++ ++ return 0; ++} ++ ++static int rx51_set_fmtx(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ ++ if (rx51_fmtx_func == ucontrol->value.integer.value[0]) ++ return 0; ++ ++ rx51_fmtx_func = ucontrol->value.integer.value[0]; ++ rx51_ext_control(codec); ++ ++ return 1; ++} ++ + static struct snd_soc_jack rx51_av_jack; + + static struct snd_soc_jack_gpio rx51_av_jack_gpios[] = { +@@ -228,6 +255,7 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { + SND_SOC_DAPM_SPK("Ext Spk", rx51_spk_event), + SND_SOC_DAPM_MIC("DMic", NULL), + SND_SOC_DAPM_HP("Headphone Jack", NULL), ++ SND_SOC_DAPM_LINE("FM Transmitter", NULL), + }; + + static const struct snd_soc_dapm_route audio_map[] = { +@@ -241,16 +269,21 @@ static const struct snd_soc_dapm_route audio_map[] = { + {"Headphone Jack", NULL, "TPA6130A2 Headphone Right"}, + {"TPA6130A2 Left", NULL, "LLOUT"}, + {"TPA6130A2 Right", NULL, "RLOUT"}, ++ ++ {"FM Transmitter", NULL, "LLOUT"}, ++ {"FM Transmitter", NULL, "RLOUT"}, + }; + + static const char *spk_function[] = {"Off", "On"}; + static const char *input_function[] = {"ADC", "Digital Mic"}; + static const char *jack_function[] = {"Off", "TV-OUT", "Headphone"}; ++static const char *fmtx_function[] = {"Off", "On"}; + + static const struct soc_enum rx51_enum[] = { + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(spk_function), spk_function), + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(input_function), input_function), + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(jack_function), jack_function), ++ SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(fmtx_function), fmtx_function), + }; + + static const struct snd_kcontrol_new aic34_rx51_controls[] = { +@@ -260,6 +293,8 @@ static const struct snd_kcontrol_new aic34_rx51_controls[] = { + rx51_get_input, rx51_set_input), + SOC_ENUM_EXT("Jack Function", rx51_enum[2], + rx51_get_jack, rx51_set_jack), ++ SOC_ENUM_EXT("FMTX Function", rx51_enum[3], ++ rx51_get_fmtx, rx51_set_fmtx), + }; + + static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-RX-51-Add-support-for-earpiece.patch ^ |
@@ -0,0 +1,134 @@ +From 9a86d04b734cf72704bf9c4cbec092e3efe8b021 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 29 Jun 2010 15:16:17 +0300 +Subject: [PATCH 20/42] ASoC: RX-51: Add support for earpiece + +Earpiece is connected to HPL pins of the second TLV320AIC34 codec instance. +Audio routings between AIC34A, AIC34B and earpiece is following + + AIC34A MONO_LOUT -> AIC34B LINE2R -> AIC34B HPL -> earpiece + +Add support for this routing by using the aic34b_dummy driver. + +As the aic34b_dummy should vanish after the ASoC multi-component is ready, +also this patch must be edited by modifying the audio_map accordingly. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/rx51.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 files changed, 39 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index a85194a..ee9e7cd 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -39,6 +39,7 @@ + #include "omap-pcm.h" + #include "../codecs/tlv320aic3x.h" + #include "../codecs/tpa6130a2.h" ++#include "aic34b_dummy.h" + + #define RX51_TVOUT_SEL_GPIO 40 + #define RX51_JACK_DETECT_GPIO 177 +@@ -58,6 +59,7 @@ static int rx51_spk_func; + static int rx51_dmic_func; + static int rx51_jack_func; + static int rx51_fmtx_func; ++static int rx51_ear_func; + + static void rx51_ext_control(struct snd_soc_codec *codec) + { +@@ -86,6 +88,10 @@ static void rx51_ext_control(struct snd_soc_codec *codec) + snd_soc_dapm_enable_pin(codec, "FM Transmitter"); + else + snd_soc_dapm_disable_pin(codec, "FM Transmitter"); ++ if (rx51_ear_func) ++ snd_soc_dapm_enable_pin(codec, "Earpiece"); ++ else ++ snd_soc_dapm_disable_pin(codec, "Earpiece"); + + gpio_set_value(RX51_TVOUT_SEL_GPIO, + rx51_jack_func == RX51_JACK_TVOUT); +@@ -239,6 +245,28 @@ static int rx51_set_fmtx(struct snd_kcontrol *kcontrol, + return 1; + } + ++static int rx51_get_ear(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ ucontrol->value.integer.value[0] = rx51_ear_func; ++ ++ return 0; ++} ++ ++static int rx51_set_ear(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ ++ if (rx51_ear_func == ucontrol->value.integer.value[0]) ++ return 0; ++ ++ rx51_ear_func = ucontrol->value.integer.value[0]; ++ rx51_ext_control(codec); ++ ++ return 1; ++} ++ + static struct snd_soc_jack rx51_av_jack; + + static struct snd_soc_jack_gpio rx51_av_jack_gpios[] = { +@@ -256,6 +284,7 @@ static const struct snd_soc_dapm_widget aic34_dapm_widgets[] = { + SND_SOC_DAPM_MIC("DMic", NULL), + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_LINE("FM Transmitter", NULL), ++ SND_SOC_DAPM_SPK("Earpiece", NULL), + }; + + static const struct snd_soc_dapm_route audio_map[] = { +@@ -272,18 +301,24 @@ static const struct snd_soc_dapm_route audio_map[] = { + + {"FM Transmitter", NULL, "LLOUT"}, + {"FM Transmitter", NULL, "RLOUT"}, ++ ++ {"34B_LINE2R", NULL, "MONO_LOUT"}, ++ {"Earpiece", NULL, "34B_HPLOUT"}, ++ {"Earpiece", NULL, "34B_HPLCOM"}, + }; + + static const char *spk_function[] = {"Off", "On"}; + static const char *input_function[] = {"ADC", "Digital Mic"}; + static const char *jack_function[] = {"Off", "TV-OUT", "Headphone"}; + static const char *fmtx_function[] = {"Off", "On"}; ++static const char *ear_function[] = {"Off", "On"}; + + static const struct soc_enum rx51_enum[] = { + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(spk_function), spk_function), + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(input_function), input_function), + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(jack_function), jack_function), + SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(fmtx_function), fmtx_function), ++ SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(ear_function), ear_function), + }; + + static const struct snd_kcontrol_new aic34_rx51_controls[] = { +@@ -295,6 +330,8 @@ static const struct snd_kcontrol_new aic34_rx51_controls[] = { + rx51_get_jack, rx51_set_jack), + SOC_ENUM_EXT("FMTX Function", rx51_enum[3], + rx51_get_fmtx, rx51_set_fmtx), ++ SOC_ENUM_EXT("Earpiece Function", rx51_enum[4], ++ rx51_get_ear, rx51_set_ear), + }; + + static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) +@@ -320,6 +357,8 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) + tpa6130a2_add_controls(codec); + snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); + ++ aic34b_add_controls(codec); ++ + /* Set up RX-51 specific audio path audio_map */ + snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-omap-RX-51-Workaround-aic34b_dummy-to-work-with.patch ^ |
@@ -0,0 +1,39 @@ +From f64893219f845505de3f54286b66681ede60783f Mon Sep 17 00:00:00 2001 +From: ext Jarkko Nikula <jhnikula@gmail.com> +Date: Fri, 18 Feb 2011 10:36:44 +0100 +Subject: [PATCH 1/2] ASoC: omap: RX-51: Workaround aic34b_dummy to work with recent aic3x changes + +Recent tlv320aic3x changes started to use supply regulators dynamically +and the codec is unpowered when idle. This has side effect to aic34b_dummy +so that the chip test in aic34b_dummy_probe fails because the codec is +unpowered at probing time. + +Workaround the problem by not testing the chip existence in aic34b_dummy_probe. +Better fix would be to add regulator support to aic34b_dummy but it's not +worth of effort as the aic34b_dummy does always direct register writes +(i.e. no caching) and the codec B part is accessed only when A part is +powered. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/aic34b_dummy.c | 4 ---- + 1 files changed, 0 insertions(+), 4 deletions(-) + +diff --git a/sound/soc/omap/aic34b_dummy.c b/sound/soc/omap/aic34b_dummy.c +index bace5fc..7ad70b0 100644 +--- a/sound/soc/omap/aic34b_dummy.c ++++ b/sound/soc/omap/aic34b_dummy.c +@@ -211,10 +211,6 @@ EXPORT_SYMBOL_GPL(aic34b_add_controls); + static int aic34b_dummy_probe(struct i2c_client *client, + const struct i2c_device_id *id) + { +- if (aic34b_read(client, AIC3X_PLL_PROGA_REG) != 0x10) { +- /* Chip not present */ +- return -ENODEV; +- } + aic34b_client = client; + + return 0; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-omap-rx51-Report-headset-instead-of-video-out-i.patch ^ |
@@ -0,0 +1,48 @@ +From e69a578a194d23340a6323991c3bc4942518c2be Mon Sep 17 00:00:00 2001 +From: ext Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 7 Dec 2010 11:50:33 +0100 +Subject: [PATCH 23/42] ASoC: omap: rx51: Report headset instead of video out in MeeGo kernel + +In MeeGo version of RX51/N900 audio drivers it's more usefull to report +headset instead of video out cable in response to jack insertion. There is +no automatic accessory detection either in MeeGo or upstream version so a +static accessory type have to be used. Upstream is using the video out as it +is the best supported jack feature at the moment but MeeGo variant can +support also headphones and headsets. + +Report headset insertion in MeeGo as this is more usual use-case than video +out cable. It's expected that the same will be done in upstream as well when +the necessary ASoC core changes are done that make possible to support N900 +audio output. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + sound/soc/omap/rx51.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index 8f13092..6a4a894 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -281,7 +281,7 @@ static struct snd_soc_jack_gpio rx51_av_jack_gpios[] = { + { + .gpio = RX51_JACK_DETECT_GPIO, + .name = "avdet-gpio", +- .report = SND_JACK_VIDEOOUT, ++ .report = SND_JACK_HEADSET, + .invert = 1, + .debounce_time = 200, + }, +@@ -378,7 +378,7 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) + + /* AV jack detection */ + err = snd_soc_jack_new(codec, "AV Jack", +- SND_JACK_VIDEOOUT, &rx51_av_jack); ++ SND_JACK_HEADSET, &rx51_av_jack); + if (err) + return err; + err = snd_soc_jack_add_gpios(&rx51_av_jack, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-tlv320aic3x-Do-soft-reset-to-codec-when-going-t.patch ^ |
@@ -0,0 +1,52 @@ +From fbbea04e2fdb757b9bfcaa643146b34e975ad911 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Fri, 20 May 2011 16:52:38 +0300 +Subject: [PATCH 2/2] ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state + +TLV320AIC33, TLV320AIC34 and I believe others too in this family have some +hw bugs that cause that analogue and digital VDD supplies remain leaking +up to a few mA of current after certain use cases even the hw blocks inside +codec are driven to off. + +Highest leakages occur after using the bypass paths inside codec but it +is possible to get smaller leakages just by toggling mute switches in +unused audio paths (i.e. no DAPM changes) while codec is on due another +active audio path. + +While some cases are able to workaroud by making sure that e.g. output mixer +switches are muted before powering down the output stage this doesn't help +all the cases. + +Therefore use the software reset command to clear possible leakage currents +since that works in every cases and affects only this codec instance. Only +drawback is that now cache sync is required everytime when codec bias comes +out from bias off state, not only when supply regulators were off. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> +Signed-off-by: Liam Girdwood <lrg@ti.com> +--- + sound/soc/codecs/tlv320aic3x.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c +index aed96bf..487d4a9 100644 +--- a/sound/soc/codecs/tlv320aic3x.c ++++ b/sound/soc/codecs/tlv320aic3x.c +@@ -1115,6 +1115,13 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power) + aic3x_init_3007(codec); + codec->cache_sync = 0; + } else { ++ /* ++ * Do soft reset to this codec instance in order to clear ++ * possible VDD leakage currents in case the supply regulators ++ * remain on ++ */ ++ snd_soc_write(codec, AIC3X_RESET, SOFT_RESET); ++ codec->cache_sync = 1; + aic3x->power = 0; + /* HW writes are needless when bias is off */ + codec->cache_only = 1; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-ASoC-tlv320aic3x-Don-t-sync-first-two-registers-from.patch ^ |
@@ -0,0 +1,33 @@ +From 5a306589c5c363e1f6e7ff946559e1f0ffbb2719 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Fri, 20 May 2011 16:52:37 +0300 +Subject: [PATCH 1/2] ASoC: tlv320aic3x: Don't sync first two registers from register cache + +There is no need to sync first two registers from cache to hw after a reset. +First one is used to select page for register access and this driver is +normally accessing page 0 only. Second one does a software reset which is +obviously unneeded after hardware or previous software reset command. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> +Signed-off-by: Liam Girdwood <lrg@ti.com> +--- + sound/soc/codecs/tlv320aic3x.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c +index 77b8f9a..aed96bf 100644 +--- a/sound/soc/codecs/tlv320aic3x.c ++++ b/sound/soc/codecs/tlv320aic3x.c +@@ -1109,7 +1109,7 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power) + + /* Sync reg_cache with the hardware */ + codec->cache_only = 0; +- for (i = 0; i < ARRAY_SIZE(aic3x_reg); i++) ++ for (i = AIC3X_SAMPLE_RATE_SEL_REG; i < ARRAY_SIZE(aic3x_reg); i++) + snd_soc_write(codec, i, cache[i]); + if (aic3x->model == AIC3X_MODEL_3007) + aic3x_init_3007(codec); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-Added-video-data-to-support-tvout-on-rx51.patch ^ |
@@ -0,0 +1,84 @@ +From db5004a26b3f8b6689c389671b4799849e4acf38 Mon Sep 17 00:00:00 2001 +From: Bhavanarayana Srikar.1 (EXT-Elektrobit/Helsinki) <ext-srikar.1.bhavanarayana@nokia.com> +Date: Thu, 25 Nov 2010 17:09:01 +0100 +Subject: [PATCH 25/42] Added video data to support tvout on rx51 + +To support tvout on rx51,added Intilization data, +tvout as display device and enabled venc through gpio +on rx51 + +Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com> +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-video.c | 25 ++++++++++++++++++++++++- + 1 files changed, 24 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c +index 85503fe..e3cea61 100644 +--- a/arch/arm/mach-omap2/board-rx51-video.c ++++ b/arch/arm/mach-omap2/board-rx51-video.c +@@ -14,7 +14,6 @@ + #include <linux/gpio.h> + #include <linux/spi/spi.h> + #include <linux/mm.h> +- + #include <asm/mach-types.h> + #include <plat/display.h> + #include <plat/vram.h> +@@ -25,6 +24,9 @@ + #include "mux.h" + + #define RX51_LCD_RESET_GPIO 90 ++/* REVISIT to verify with rx51.c at sound/soc/omap */ ++#define RX51_TVOUT_SEL_GPIO 40 ++ + + #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) + +@@ -39,6 +41,15 @@ static void rx51_lcd_disable(struct omap_dss_device *dssdev) + gpio_set_value(dssdev->reset_gpio, 0); + } + ++static int rx51_tvout_enable(struct omap_dss_device *dssdev) ++{ ++ return 0; ++} ++ ++static void rx51_tvout_disable(struct omap_dss_device *dssdev) ++{ ++} ++ + static struct omap_dss_device rx51_lcd_device = { + .name = "lcd", + .driver_name = "panel-acx565akm", +@@ -49,8 +60,19 @@ static struct omap_dss_device rx51_lcd_device = { + .platform_disable = rx51_lcd_disable, + }; + ++static struct omap_dss_device rx51_tv_device = { ++ .name = "tv", ++ .type = OMAP_DISPLAY_TYPE_VENC, ++ .driver_name = "venc", ++ .phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE, ++ .reset_gpio = RX51_TVOUT_SEL_GPIO, ++ .platform_enable = rx51_tvout_enable, ++ .platform_disable = rx51_tvout_disable, ++}; ++ + static struct omap_dss_device *rx51_dss_devices[] = { + &rx51_lcd_device, ++ &rx51_tv_device, + }; + + static struct omap_dss_board_info rx51_dss_board_info = { +@@ -88,6 +110,7 @@ static int __init rx51_video_init(void) + + gpio_direction_output(RX51_LCD_RESET_GPIO, 1); + ++ + platform_add_devices(rx51_video_devices, + ARRAY_SIZE(rx51_video_devices)); + return 0; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-Bluetooth-Add-sysfs-interface-for-hci_h4p-driver-to-.patch ^ |
@@ -0,0 +1,180 @@ +From 2e456c145ca8276f2655c368a442625fb6b68b74 Mon Sep 17 00:00:00 2001 +From: Tommi Keisala <ext-tommi.keisala@nokia.com> +Date: Thu, 9 Dec 2010 15:15:39 +0200 +Subject: [PATCH] Bluetooth: Add sysfs interface for hci_h4p driver to control MAC address + +Integrated from hci_h4p driver by Ville Tervo MAC address control for bluetooth +interface. + +Signed-off-by: Tommi Keisala <ext-tommi.keisala@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 52 +++++++++++++++++++++++++- + drivers/bluetooth/hci_h4p/fw-bcm.c | 30 ++++++++++++--- + drivers/bluetooth/hci_h4p/hci_h4p.h | 8 ++++ + include/linux/bluetooth/hci_h4p.h | 1 + + 4 files changed, 83 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 83c6d2d..5558335 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -1213,6 +1213,50 @@ static struct platform_device rx51_bt_device = { + } + }; + ++static ssize_t hci_h4p_store_bdaddr(struct device *dev, ++ struct device_attribute *attr, ++ const char *buf, size_t count) ++{ ++ struct hci_h4p_platform_data *bt_config = ++ rx51_bt_device.dev.platform_data; ++ unsigned int bdaddr[6]; ++ int ret, i; ++ ++ ret = sscanf(buf, "%2x:%2x:%2x:%2x:%2x:%2x\n", ++ &bdaddr[0], &bdaddr[1], &bdaddr[2], ++ &bdaddr[3], &bdaddr[4], &bdaddr[5]); ++ ++ if (ret != 6) ++ return -EINVAL; ++ ++ for (i = 0; i < 6; i++) ++ bt_config->bd_addr[i] = bdaddr[i] & 0xff; ++ ++ return count; ++} ++ ++static ssize_t hci_h4p_show_bdaddr(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct hci_h4p_platform_data *bt_config = ++ rx51_bt_device.dev.platform_data; ++ ++ return sprintf(buf, "%.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", ++ bt_config->bd_addr[0], ++ bt_config->bd_addr[1], ++ bt_config->bd_addr[2], ++ bt_config->bd_addr[3], ++ bt_config->bd_addr[4], ++ bt_config->bd_addr[5]); ++} ++ ++static DEVICE_ATTR(bdaddr, S_IRUGO | S_IWUSR, hci_h4p_show_bdaddr, ++ hci_h4p_store_bdaddr); ++int hci_h4p_sysfs_create_files(struct device *dev) ++{ ++ return device_create_file(dev, &dev_attr_bdaddr); ++} ++ + void __init rx51_bt_init(void) + { + int err; +@@ -1236,8 +1280,12 @@ void __init rx51_bt_init(void) + bt_plat_data.uart_base = ioremap(OMAP3_UART2_BASE, SZ_2K); + + err = platform_device_register(&rx51_bt_device); +- if (!err) +- return; ++ if (!err) { ++ err = hci_h4p_sysfs_create_files(&rx51_bt_device.dev); ++ if(!err) ++ return; ++ platform_device_unregister(&rx51_bt_device); ++ } + + gpio_free(RX51_HCI_H4P_HOSTWU_GPIO); + fail2: +diff --git a/drivers/bluetooth/hci_h4p/fw-bcm.c b/drivers/bluetooth/hci_h4p/fw-bcm.c +index a0c8558..3b77a93 100644 +--- a/drivers/bluetooth/hci_h4p/fw-bcm.c ++++ b/drivers/bluetooth/hci_h4p/fw-bcm.c +@@ -24,6 +24,7 @@ + #include <linux/skbuff.h> + #include <linux/delay.h> + #include <linux/serial_reg.h> ++#include <linux/bluetooth/hci_h4p.h> + + #include "hci_h4p.h" + +@@ -32,6 +33,13 @@ static struct sk_buff_head *fw_q; + static int inject_bdaddr(struct hci_h4p_info *info, struct sk_buff *skb) + { + unsigned int offset; ++ int i; ++ struct hci_h4p_platform_data *config; ++ ++ config = info->dev->platform_data; ++ ++ if (!config) ++ return -ENODEV; + + if (skb->len < 10) { + dev_info(info->dev, "Valid bluetooth address not found.\n"); +@@ -39,12 +47,22 @@ static int inject_bdaddr(struct hci_h4p_info *info, struct sk_buff *skb) + } + + offset = 4; +- skb->data[offset + 5] = 0x00; +- skb->data[offset + 4] = 0x11; +- skb->data[offset + 3] = 0x22; +- skb->data[offset + 2] = 0x33; +- skb->data[offset + 1] = 0x44; +- skb->data[offset + 0] = 0x55; ++ skb->data[offset + 5] = config->bd_addr[0]; ++ skb->data[offset + 4] = config->bd_addr[1]; ++ skb->data[offset + 3] = config->bd_addr[2]; ++ skb->data[offset + 2] = config->bd_addr[3]; ++ skb->data[offset + 1] = config->bd_addr[4]; ++ skb->data[offset + 0] = config->bd_addr[5]; ++ ++ for (i = 0; i < 6; i++) { ++ if (config->bd_addr[i] != 0x00) ++ break; ++ } ++ ++ if (i > 5) { ++ dev_info(info->dev, "Valid bluetooth address not found.\n"); ++ return -ENODEV; ++ } + + return 0; + } +diff --git a/drivers/bluetooth/hci_h4p/hci_h4p.h b/drivers/bluetooth/hci_h4p/hci_h4p.h +index 7ea10b8..370740e 100644 +--- a/drivers/bluetooth/hci_h4p/hci_h4p.h ++++ b/drivers/bluetooth/hci_h4p/hci_h4p.h +@@ -193,6 +193,11 @@ struct hci_fw_event { + u8 status; + } __attribute__ ((packed)); + ++struct hci_bc4_set_bdaddr { ++ u8 type; ++ struct hci_command_hdr cmd_hdr; ++} __attribute__ ((packed)); ++ + int hci_h4p_send_alive_packet(struct hci_h4p_info *info); + + void hci_h4p_bcm_parse_fw_event(struct hci_h4p_info *info, +@@ -214,6 +219,9 @@ int hci_h4p_read_fw(struct hci_h4p_info *info, struct sk_buff_head *fw_queue); + int hci_h4p_send_fw(struct hci_h4p_info *info, struct sk_buff_head *fw_queue); + void hci_h4p_parse_fw_event(struct hci_h4p_info *info, struct sk_buff *skb); + ++int hci_h4p_sysfs_create_files(struct device *dev); ++void hci_h4p_sysfs_remove_files(struct device *dev); ++ + void hci_h4p_outb(struct hci_h4p_info *info, unsigned int offset, u8 val); + u8 hci_h4p_inb(struct hci_h4p_info *info, unsigned int offset); + void hci_h4p_set_rts(struct hci_h4p_info *info, int active); +diff --git a/include/linux/bluetooth/hci_h4p.h b/include/linux/bluetooth/hci_h4p.h +index ba1d764..d69673a 100644 +--- a/include/linux/bluetooth/hci_h4p.h ++++ b/include/linux/bluetooth/hci_h4p.h +@@ -38,4 +38,5 @@ struct hci_h4p_platform_data { + void (*bt_wu)(bool); + void (*reset)(bool); + unsigned int host_wu_gpio; ++ u8 bd_addr[6]; + }; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-Bluetooth-Support-for-n900-bluetooth-hardware.patch ^ |
@@ -0,0 +1,2314 @@ +From 73669c2e02c4ef286d3f950046fae768fcd56d34 Mon Sep 17 00:00:00 2001 +From: Ville Tervo <ville.tervo@nokia.com> +Date: Fri, 9 Apr 2010 11:56:16 +0300 +Subject: [PATCH 10/42] Bluetooth: Support for n900 bluetooth hardware + +Adds support for N900 bluetooth hardware + +Signed-off-by: Ville Tervo <ville.tervo@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 73 ++ + drivers/bluetooth/Kconfig | 11 + + drivers/bluetooth/Makefile | 2 + + drivers/bluetooth/hci_h4p/Makefile | 7 + + drivers/bluetooth/hci_h4p/core.c | 1037 ++++++++++++++++++++++++++ + drivers/bluetooth/hci_h4p/fw-bcm.c | 144 ++++ + drivers/bluetooth/hci_h4p/fw-csr.c | 141 ++++ + drivers/bluetooth/hci_h4p/fw-ti1273.c | 113 +++ + drivers/bluetooth/hci_h4p/fw.c | 166 ++++ + drivers/bluetooth/hci_h4p/hci_h4p.h | 231 ++++++ + drivers/bluetooth/hci_h4p/uart.c | 203 +++++ + include/linux/bluetooth/hci_h4p.h | 41 + + 12 files changed, 2169 insertions(+), 0 deletions(-) + create mode 100644 drivers/bluetooth/hci_h4p/Makefile + create mode 100644 drivers/bluetooth/hci_h4p/core.c + create mode 100644 drivers/bluetooth/hci_h4p/fw-bcm.c + create mode 100644 drivers/bluetooth/hci_h4p/fw-csr.c + create mode 100644 drivers/bluetooth/hci_h4p/fw-ti1273.c + create mode 100644 drivers/bluetooth/hci_h4p/fw.c + create mode 100644 drivers/bluetooth/hci_h4p/hci_h4p.h + create mode 100644 drivers/bluetooth/hci_h4p/uart.c + create mode 100644 include/linux/bluetooth/hci_h4p.h + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index e56d6d7..1209134 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -25,6 +25,7 @@ + #include <linux/gpio_keys.h> + #include <linux/mmc/host.h> + #include <sound/tlv320aic3x.h> ++#include <linux/bluetooth/hci_h4p.h> + + #include <plat/mcspi.h> + #include <plat/board.h> +@@ -33,6 +34,7 @@ + #include <plat/gpmc.h> + #include <plat/onenand.h> + #include <plat/gpmc-smc91x.h> ++#include <plat/serial.h> + + #include <mach/board-rx51.h> + +@@ -53,6 +55,10 @@ + #define RX51_TSC2005_RESET_GPIO 104 + #define RX51_TSC2005_IRQ_GPIO 100 + ++#define RX51_HCI_H4P_RESET_GPIO 91 ++#define RX51_HCI_H4P_HOSTWU_GPIO 101 ++#define RX51_HCI_H4P_BTWU_GPIO 37 ++ + /* list all spi devices here */ + enum { + RX51_SPI_WL1251, +@@ -954,6 +960,72 @@ error: + */ + } + ++static void rx51_hci_h4p_set_power(bool enable) ++{ ++ gpio_set_value(RX51_HCI_H4P_RESET_GPIO, enable); ++} ++ ++static void rx51_hci_h4p_set_bt_wu(bool enable) ++{ ++ gpio_set_value(RX51_HCI_H4P_BTWU_GPIO, enable); ++} ++ ++static bool rx51_hci_h4p_get_host_wu(void) ++{ ++ return gpio_get_value(RX51_HCI_H4P_HOSTWU_GPIO); ++} ++ ++struct hci_h4p_platform_data bt_plat_data = { ++ .uart_irq = INT_24XX_UART2_IRQ, ++ .host_wu = rx51_hci_h4p_get_host_wu, ++ .bt_wu = rx51_hci_h4p_set_bt_wu, ++ .reset = rx51_hci_h4p_set_power, ++ .host_wu_gpio = RX51_HCI_H4P_HOSTWU_GPIO, ++}; ++ ++static struct platform_device rx51_bt_device = { ++ .name = "hci_h4p", ++ .id = -1, ++ .num_resources = 0, ++ .dev = { ++ .platform_data = (void *)&bt_plat_data, ++ } ++}; ++ ++void __init rx51_bt_init(void) ++{ ++ int err; ++ ++ err = gpio_request(RX51_HCI_H4P_RESET_GPIO, "bt_reset"); ++ if (err < 0) ++ return; ++ ++ err = gpio_request(RX51_HCI_H4P_BTWU_GPIO, "bt_wakeup"); ++ if (err < 0) ++ goto fail; ++ ++ err = gpio_request(RX51_HCI_H4P_HOSTWU_GPIO, "host_wakeup"); ++ if (err < 0) ++ goto fail2; ++ ++ gpio_direction_output(RX51_HCI_H4P_RESET_GPIO, 0); ++ gpio_direction_output(RX51_HCI_H4P_BTWU_GPIO, 0); ++ gpio_direction_input(RX51_HCI_H4P_HOSTWU_GPIO); ++ ++ bt_plat_data.uart_base = ioremap(OMAP3_UART2_BASE, SZ_2K); ++ ++ err = platform_device_register(&rx51_bt_device); ++ if (!err) ++ return; ++ ++ gpio_free(RX51_HCI_H4P_HOSTWU_GPIO); ++fail2: ++ gpio_free(RX51_HCI_H4P_BTWU_GPIO); ++fail: ++ gpio_free(RX51_HCI_H4P_RESET_GPIO); ++ printk(KERN_ERR "Bluetooth device registration failed\n"); ++} ++ + void __init rx51_peripherals_init(void) + { + rx51_i2c_init(); +@@ -962,6 +1034,7 @@ void __init rx51_peripherals_init(void) + rx51_add_gpio_keys(); + rx51_init_wl1251(); + rx51_init_tsc2005(); ++ rx51_bt_init(); + spi_register_board_info(rx51_peripherals_spi_board_info, + ARRAY_SIZE(rx51_peripherals_spi_board_info)); + omap2_hsmmc_init(mmc); +diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig +index 02deef4..740e40f 100644 +--- a/drivers/bluetooth/Kconfig ++++ b/drivers/bluetooth/Kconfig +@@ -219,4 +219,15 @@ config BT_ATH3K + Say Y here to compile support for "Atheros firmware download driver" + into the kernel or say M to compile it as module (ath3k). + ++config BT_HCIH4P ++ tristate "HCI driver with Nokia H4 extensions" ++ depends on BT ++ select FW_LOADER ++ help ++ Bluetooth HCI driver with H4 extensions. This driver provides ++ support for H4+ Bluetooth chip with vendor-specific H4 extensions. ++ ++ Say Y here to compile support for h4 extended devices into the kernel ++ or say M to compile it as module (hci_h4p). ++ + endmenu +diff --git a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile +index 71bdf13..1746a3d 100644 +--- a/drivers/bluetooth/Makefile ++++ b/drivers/bluetooth/Makefile +@@ -28,3 +28,5 @@ hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o + hci_uart-$(CONFIG_BT_HCIUART_LL) += hci_ll.o + hci_uart-$(CONFIG_BT_HCIUART_ATH3K) += hci_ath.o + hci_uart-objs := $(hci_uart-y) ++ ++obj-$(CONFIG_BT_HCIH4P) += hci_h4p/ +diff --git a/drivers/bluetooth/hci_h4p/Makefile b/drivers/bluetooth/hci_h4p/Makefile +new file mode 100644 +index 0000000..f20bd9a +--- /dev/null ++++ b/drivers/bluetooth/hci_h4p/Makefile +@@ -0,0 +1,7 @@ ++# ++# Makefile for the Linux Bluetooth HCI device drivers. ++# ++ ++obj-$(CONFIG_BT_HCIH4P) += hci_h4p.o ++ ++hci_h4p-objs := core.o fw.o uart.o fw-csr.o fw-bcm.o fw-ti1273.o +diff --git a/drivers/bluetooth/hci_h4p/core.c b/drivers/bluetooth/hci_h4p/core.c +new file mode 100644 +index 0000000..24bf02c +--- /dev/null ++++ b/drivers/bluetooth/hci_h4p/core.c +@@ -0,0 +1,1037 @@ ++/* ++ * This file is part of hci_h4p bluetooth driver ++ * ++ * Copyright (C) 2005-2010 Nokia Corporation. ++ * ++ * Contact: Ville Tervo <ville.tervo@nokia.com> | ||
[-] [+] | Added | linux-2.6-Camera-for-Meego-N900-Adaptation-kernel-2.6.37-patch.patch ^ |
@@ -0,0 +1,38624 @@ +From 0a58bb961c1f5bf54b7170f67595c6f61a76dfc8 Mon Sep 17 00:00:00 2001 +From: Teemu Tuominen <tux@t3.fi> +Date: Wed, 29 Dec 2010 14:25:52 -0300 +Subject: [PATCH] Camera for Meego N900 Adaptation kernel 2.6.37 patchset + +This is a combination of 142 commits, including + +V4L2 & Media Controller backports (3.0) +TI OMAP3 ISP driver (omap3isp) +RX51 Camera board-code +RX51 Camera sensor drivers (et8ek8,smia-sensor) +RX51 Camera lens control driver (ad5820) +RX51 Camera flash led control driver (adp1653) + +010d5a2c42cc92d43f860d8f99533459701779c2 v4l2-ctrls: use const char * const * for the menu arrays +5c4713999d511518bce5e41f968cd9ef00f65c40 v4l2-ctrls: only check def for menu, integer and boolean controls +54b06678cb622e6167cd568c8969d35d9f2e5012 v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg() +c9e39de6ce1f3f82be1535caac792bf543881c71 v4l2-subdev: add (un)register internal ops +9ac9b8e5016dfa4a63f21ba788ad7a956f35946c v4l2-ctrls: v4l2_ctrl_handler_setup must set is_new to 1 +caa73a97f3861ef8716bb1c30403a64d795148c0 v4l2-ctrls: fix missing 'read-only' check +d06a5d8e9070d6b7f42d287bef651c7cc8c34832 v4l2-ctrls: queryctrl shouldn't attempt to replace V4L2_CID_PRIVATE_BASE IDs +53a15ddb26fe101f9a2caa474d8d53ede7d89e22 v4l: Include linux/videodev2.h in media/v4l2-ctrls.h +8b7dc73037f6512050ef4994559b59d876af1dd7 v4l: Fix a use-before-set in the control framework +7a4da491ca2085213ba342c5beb1e5f8e765e08d v4l2-dev: don't memset video_device.dev +e7e6746994dc2e1b826ddcc8dffaef454f21526f v4l2-device: fix 'use-after-freed' oops +dc49e8a9466f684456bca6dfc24e419a6ef87282 v4l: Share code between video_usercopy and video_ioctl2 +0cd6482ac0cb2f1d50e71c72a3b07b368ecc14dc v4l: subdev: Don't require core operations +6365f2195eb678dcf1060a35ce360fa292d9d873 v4l: subdev: Add device node support +3a1569b3ecad6ad82b5b3c62f057ac791a6902de v4l: subdev: Uninline the v4l2_subdev_init function +c49af8baf26cdee4815b2a092b65e81798089971 v4l: subdev: Control ioctls support +6b6508e460f68ff2fc2ee5bb8954a18efe254096 v4l: subdev: Events support +27da6831e4622eb9d06d97089d782d85f114d112 media: Media device node support +37e755f347b3bc8a1c6c4e2dd2450bee62ebde88 media: Media device +c77b341690cea7e1cdf5585e1279944111801b11 media: Entities, pads and links +aa7ba69288c02ae1e21b6ac64263d3938f58e1e0 media: Entity graph traversal +16b6a7e8c3a9ca4cf2b0deca32731b3ef9b30e6e media: Entity use count +09e1dd2a9699128c6e9e91a786e90365f01260ad media: Media device information query +d4831b2aea1dc2a80f00fee37d0f78cd14f09de1 media: Entities, pads and links enumeration +be58b02e11079cf5f333299f8da596be7c63c80a media: Links setup +189721420f786e34bdbb22a1adc3c368641bf298 media: Pipelines and media streams +7228d6e9ab45e44cbccc51a98413b17132e87ed9 v4l: Add a media_device pointer to the v4l2_device structure +a6db42f54c6bc4a40bc30fd2119c3143100fc32e v4l: Make video_device inherit from media_entity +7b03b7b628cbb8bd64e276fa862960e87f18bf2f v4l: Make v4l2_subdev inherit from media_entity +38dc6b393dc60fb0f58d75b3551ae000998c9402 v4l: Move the media/v4l2-mediabus.h header to include/linux +4394cc2f5bc756424978f3e303c0685f4f500ce6 v4l: Replace enums with fixed-sized fields in public structure +6c4baebaf5f1811216448108005b493b6ce6e8b5 v4l: Rename V4L2_MBUS_FMT_GREY8_1X8 to V4L2_MBUS_FMT_Y8_1X8 +30d7c760b589bd553fce43a65e8d8f6eaef91064 v4l: Group media bus pixel codes by types and sort them alphabetically +d2f0b6c2463841b91bcf6233c60e56b2f083914f v4l: Create v4l2 subdev file handle structure +a9e18381138e1dbada992c1a56b55e36306015eb v4l: subdev: Add new file operations +f1a78affc2e513b67e3a99313d7060b8e4153d29 v4l: v4l2_subdev pad-level operations +aa45e01106e39b1f162b52db48659609110a3c47 v4l: v4l2_subdev userspace format API - documentation binary files +0c71fbbf0fe4ba06bda3b46563b103f4d774fc46 v4l: v4l2_subdev userspace format API +9102c9e506da0d4f1b06cef04aafd5fabfe41287 v4l: v4l2_subdev userspace frame interval API +351540bd3ff3c1c1fe0b6535157a1d4be49c175b v4l: v4l2_subdev userspace crop API +1df30ae78701545ac07ff0bdb85cc465754c5dd5 v4l: Add subdev sensor g_skip_frames operation +377ad10c7eef406b0fe535a9d9892948624896b7 v4l: Add 8-bit YUYV on 16-bit bus and SGRBG10 media bus pixel codes +819311501d60937ed65ff9f30fcb3937537fbeea v4l: Add remaining RAW10 patterns w DPCM pixel code variants +07ef1ceef1179f18b405c3038baa2670c12ceb8e v4l: Add missing 12 bits bayer media bus formats +26182e8250f09e92d881013b69e13c6336bb3499 v4l: Add 12 bits bayer pixel formats +17ae85d7853e063167c45d02981bce7c862f1a69 ARM: OMAP3: Update Camera ISP definitions for OMAP3630 +9cb177f96a42e42268b7268f0f8eb60320a06724 omap3: Remove unusued ISP CBUFF resource +64110e350c71c4c06ff23485f643642116c6fac4 omap3: Add function to register omap3isp platform device structure +33190554ae6c28ed927d1635fc9831ea1772bba5 omap2: Fix camera resources for multiomap +1c76592794027de4cf49c7f3ce0f007b99fb2fa8 v4l: subdev: Generic ioctl support +6bd2babdf195b02cbe2e29f38db0841230454961 omap3isp: OMAP3 ISP core +05b996e15a22c7010c8f9fe0088e384d951d2d1a omap3isp: Video devices and buffers queue +e0ecc0e7f62649bc756db72bb9e4b46275744913 omap3isp: CCP2/CSI2 receivers +43edd44298470fcd932ec119785ad5780d05b580 omap3isp: CCDC, preview engine and resizer +ef344a3229c2dcb256110c0229ec58bd74a46cbe omap3isp: Statistics +02adf491dee7319e6be3322166d2646a3d683536 omap3isp: Kconfig and Makefile +dd425eae5f81d3f175c8db5ef00198f4c8fedd92 omap3isp: Add set performance callback in isp platform data +66efd61eb0c8f1e4dab377f3cd2e29053bd2dcf4 media: Pick a free ioctls range +9c74955b464dc31ce177afaafc6ccfd63503c7bd omap3isp: Add documentation +1167daeb8590bc924d811abc11f035e2dc55cd3a media: Use correct ioctl name in MEDIA_IOC_SETUP_LINK documentation +115e418dc6a3dc8a9e22b88da58eafc211391bc8 omap3isp: resizer: Center the crop rectangle +188826be66fc7c1ba8b77a78a77a7daa39456846 omap3isp: resizer: Use 4-tap mode equations when the ratio is <= 512 +c5849a843442cea0f2f73eafcd9e03a22419f5f0 omap3isp: resizer: Improved resizer rsz factor formula +0ec3a2a2f60d6a3a2f8605617a46a21e22a7378b omap3isp: Fix trivial typos +e557a88391a12938542951fc57409b4057637eb9 media: Properly handle link flags in link setup, link notify callback +92a57c39c41e5a39f68d2cb67ca8f9b87a74b272 omap3isp: stat: update struct ispstat_generic_config's comments +8ae89b8fb831070b77c64c3e357e355b7855038d omap3isp: isp: Reset the ISP when the pipeline can't be stopped +a306ae83b4db2b528f8f0b291d109d52e6f0f85c omap3isp: Use isp xclk defines +eac4479286149f075791bdbd95a0b830c26f52f8 v4l: add V4L2_PIX_FMT_Y12 format +91d56119bb83f93c3a68dce13f7d68286226903d media: add missing 8-bit bayer formats and Y12 +c92b219de7feb9efffb44b01da6f76eba66bdb8e omap3isp: ccdc: support Y10/12, 8-bit bayer fmts +f8c76c46d206d99ac926b5c0338531fbe554c9e6 omap3isp: lane shifter support +b853c4cc8f910b30e4ff39d716163652eb76972c omap3isp: Don't increment node entity use count when poweron fails +f06b40ffba764d2a98b036d54d125986c69ef554 v4l: Don't register media entities for subdev device nodes +82dc964cae07b3069e9f7df83b849611cd96fba1 omap3isp: queue: Don't corrupt buf->npages when get_user_pages() fails +5c24dca1c9160827656aa43cb1917ae663c090fc Fix common misspellings +3adb2d1c12161cf5d3aa85f73aed11f0aabeb217 [media] v4l: Release module if subdev registration fails +bd5992abe5b8a23c70e5e459368528c6d4858d1e [media] v4l2-subdev: fix broken subdev control enumeration +53e4defb9f98718685f64597054c063f875655a7 V4L: Create control class for sensor mode +5bef2e6e05f221f5bc524566de80ff2a2d025c79 V4L: add ad5820 focus specific custom controls +0cddbefb5f606ce6025a2de0c54213bbdf0afd8d V4L: add V4L2_CID_TEST_PATTERN +9b4500fa22fd9b97ef8e81616c6b4ae10a50b173 V4L: Add V4L2_CID_MODE_OPSYSCLOCK for reading output system clock +9d08e0d8cd43e1055a2cc79cddf8bd9ca5c7dce6 v4l: add set of controls for flash + sync values with harmattan +6494477e02b4ff3144a68fa5a2512e656a61ac87 v4l2-ctrls: backport of bitmask control type from upstream +dbd4cd59f0c765c44a9f7cb3971d21308fa3a057 omap343x: Add CONTROL_CSIRXFE register bits definitions +10142ddb56a46c049269fa231597660e0ebf92d4 smiaregs: Generic i2c register writing +291201178e38ccbbdeb2ca74d8aa34d41692b4a4 smiaregs: Add V4L2_CID_MODE_OPSYSCLOCK for reading output system clock +02e4fd9fa377be458448eab612b0a494d7efe6f1 et8ek8: Toshiba 5MP sensor driver +bf8d3e31109c1dc3c9e99a08cbf985a6ce6b5d7b et8ek8: Update as per changes in platform data +e93c2b279318cfc1a86fe4ee0016afb005dc3a2e et8ek8: Do not break power off sequence in middle +d2896d3acb1c8c9491e9087e10bd97d88f865870 et8ek8: Move VANA handling to regulator framework +1e0b3619bccef7608365565787b0f6ad2484c3ef et8ek8: Use the control framework +0cc0a8810e2c78aebeb0def179e85d5b684a45cd et8ek8: Drop chip ident numbers +ff0fb8ab3feff24a969b5053819e0044b065a72c et8ek8: Power the device on/off on open/close +05886cf798eaa7ef689b8a87a5994d2c998f6f3c et8ek8: Initialize output pad format at startup +429a15ad72fec0e6749b66b3205f6f7de861707a et8ek8: Initialize try format in open() +98729c03352392d534246521437136a9f151fb6b et8ek8: Update to the latest media controller API +14d60a0c3378583cf141f07c5745b015f52f9855 et8ek8: Rename MC flags to match upstream +8ef30c9320c103326631b31772d825a1cf9f2384 et8ek8: Move open/close file operations to internal ops structure +f4f37867613ca35ddae1a1efea6c3dba4b5c857f et8ek8: Replace core.s_config operation with internal.registered +9671ad93376a61dad4941300f8c7f3d63fdaf9c7 et8ek8: Free control handler on device removal +a66a458a568455357b561a1534ce8ea1a700965c et8ek8: Call configure_interface when configuring the format +d03dcc1ce6f9955f849b848a8e294690e219595e et8ek8: Compile fix for V4L2 control handler registration. +2676144747110c0ceca5dbc66442bb8044238184 smia-sensor: Generic SMIA sensor driver +d43da0ec1907e11c7145795aa8081d1414e51748 smia-sensor: Make subdev name same as the detected sensor's name +4aa04eded0f565b5fb2ea53d8bdc8db2e3167629 smia-sensor: Add v4l2 chip identification for supported sensors +8320ba81656c8c6c6aa5b78af5df5e7eedc8455f smia-sensor: Update as per changes in platform data +43ec85a491558062080eaf6d17f72e5771217440 smia-sensor: Do not break power off sequence in middle +526b9bbf4ec111d572745cf58619ea52faa93a48 smia-sensor: Move vana handling to regulator framework +06f21fd7efe73e896b7c139aaf9b79a8b3d5f8dd smia-sensor: Fix streaming during resume from suspend +6c9fcb92deb1ff4d07e45ef2eda8433cbac76622 smia-sensor: Add V4L2 subdev pad operations (2/2) +2ae84ba77599891ff8ea5beff100c0a225b55b60 smia-sensor: Remove the height and sof_lines arguments to configure_interface() +0abb609c5c546ac5e7a2c53d3c4c394e9f7c767f smia-sensor: Call configure_interface when configuring the format +4a1d0080be938f0fe63c27c057a9049fe4acdb87 smia-sensor: Update the get_fmt/set_fmt operations to the new API (2/2) +031e38b0d2fc17021feb73ef2d6f307c302d870c smia-sensor: Add v4l2 extended controls handling +ac670a213c0127cbea04cf09a432b291afd0eb29 smia-sensor: Drop chip ident numbers +33fa9d309a43dd809a8a711cef90155d7f12a538 smia-sensor: Temporary compilation fix +aa4339f439b6a1bfec29a82123588612a1b7bdcc ad5820: Voice coil motor controller +851f05fa786a9acd05ca064402b81c22ecd7fba5 ad5820: Update as per changes in platform data +77c13abbce80651b258eb65aa5f754446f1ea173 ad5820: Move VANA handling to regulator framework +ec1c17ed9c378f0572b06e1120ccb8f1ffad8d9b ad5820: Use the control framework +381c631d855a104726d021e2433349db3f8807cd ad5820: Drop chip ident numbers +b518efcdcce02745718dde0aaedbd2073b762d6b ad5820: Power the device on/off on open/close +9a04d01ab044fa366a618bc19e9c0f6c4cb56862 ad5820: Move open/close file operations to internal ops structure +442d1b458eb6144f1c16b23f963889ad7e9e9fd7 ad5820: Replace core.s_config operation with internal.registered +3172b89f3bdbc7c1ac9a610eb98663e021c0c351 ad5820: Free control handler on device removal +6c0d11b1ae07c75982a296579f36b3acaa1ebe65 rx51 camera: Board code +3fb0d14d0fe28adc638b60d2a97f628604f63afd rx51 cam: Drop support for old I2C configuration +f5b13105aa880001b9da4ab93e35e5aca396aa98 rx51 cam: Drop power control from board file +42a531995d0e9d8d427ae438889e80827e033f66 rx51 cam: Add xshutdown handling for camera modules +05d27a77028015cdbbbbeaa2689a3fd519e9625c rx51 cam: Add CONTROL_CSIRXFE configuration +dc4558665ca993499bc4d2de80f4162e86b0eca0 rx51 peripherals: add VANA regulator supply definitions for camera +a72e33ece4bf1c186b0ab8e2cdf3044464ecbe85 rx51 cam: Replace the configure_interface() arguments +1ba2cf99cec358498ed13147afdc8b85e1c49c98 rx51 cam: Port to 2.6.37 +86848716f1a5e5e8ac787894fba8b702dd4e6937 rx51: omap3isp.h header moved +18907adbc0bc121610fe01a79e45bcab5c01baff rx51: Use standard units for intensities +8d97f373e03965558e67764cab379e7b30173d3c omap3isp: Don't fail streamon when the sensor doesn't implement s_stream +0909a0c8e838883a602d20df6762a2682f14fca4 omap3isp: video: Avoid crashes when ppeline set stream operation fails +08081c129cc6dec73534bbf8996b6939586a7b1c adp1653: Add driver for LED flash controller +e36c756003273e9e1f4a32365546c986a357ef67 adp1653: check platform_data before usage +d3822ff4226619e29f3d4586692ebaf0116890ff adp1653: check error code of adp1653_init_controls +dae8c19705468fea995595477ea349fdfc966284 adp1653: set media entity type +--- + Documentation/ABI/testing/sysfs-bus-media | 6 + + Documentation/DocBook/Makefile | 5 +- + Documentation/DocBook/media-entities.tmpl | 51 + + Documentation/DocBook/media.tmpl | 3 + + Documentation/DocBook/v4l/bayer.pdf | Bin 0 -> 12116 bytes + Documentation/DocBook/v4l/bayer.png | Bin 0 -> 9725 bytes + Documentation/DocBook/v4l/dev-subdev.xml | 313 +++ + Documentation/DocBook/v4l/media-controller.xml | 89 + + Documentation/DocBook/v4l/media-func-close.xml | 59 + + Documentation/DocBook/v4l/media-func-ioctl.xml | 116 + + Documentation/DocBook/v4l/media-func-open.xml | 94 + + .../DocBook/v4l/media-ioc-device-info.xml | 133 + + .../DocBook/v4l/media-ioc-enum-entities.xml | 308 +++ + Documentation/DocBook/v4l/media-ioc-enum-links.xml | 207 ++ + Documentation/DocBook/v4l/media-ioc-setup-link.xml | 93 + + Documentation/DocBook/v4l/pipeline.pdf | Bin 0 -> 20276 bytes + Documentation/DocBook/v4l/pipeline.png | Bin 0 -> 12130 bytes + Documentation/DocBook/v4l/pixfmt-srggb12.xml | 90 + + Documentation/DocBook/v4l/pixfmt-y12.xml | 79 + + Documentation/DocBook/v4l/pixfmt.xml | 1 + + Documentation/DocBook/v4l/subdev-formats.xml | 2526 ++++++++++++++++++++ + Documentation/DocBook/v4l/v4l2.xml | 7 + + Documentation/DocBook/v4l/vidioc-streamon.xml | 9 + + .../v4l/vidioc-subdev-enum-frame-interval.xml | 152 ++ + .../DocBook/v4l/vidioc-subdev-enum-frame-size.xml | 154 ++ + .../DocBook/v4l/vidioc-subdev-enum-mbus-code.xml | 119 + + Documentation/DocBook/v4l/vidioc-subdev-g-crop.xml | 155 ++ + Documentation/DocBook/v4l/vidioc-subdev-g-fmt.xml | 180 ++ + .../DocBook/v4l/vidioc-subdev-g-frame-interval.xml | 141 ++ + Documentation/ioctl/ioctl-number.txt | 1 + + Documentation/media-framework.txt | 353 +++ + Documentation/video4linux/omap3isp.txt | 278 +++ + Documentation/video4linux/v4l2-controls.txt | 12 + + Documentation/video4linux/v4l2-framework.txt | 127 +- + MAINTAINERS | 6 + + arch/arm/mach-omap2/Kconfig | 4 + + arch/arm/mach-omap2/Makefile | 1 + + arch/arm/mach-omap2/board-rx51-camera.c | 440 ++++ + arch/arm/mach-omap2/board-rx51-peripherals.c | 11 + + arch/arm/mach-omap2/board-rx51.c | 2 + + arch/arm/mach-omap2/control.h | 7 + | ||
[-] [+] | Added | linux-2.6-DSS2-patches.patch ^ |
@@ -0,0 +1,846 @@ +From 6e09be6ecac390787aca38493db21cf1b9df756e Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Thu, 27 Jan 2011 14:57:27 +0200 +Subject: [PATCH 37/42] DSS2 patches + +Consists of the following patches: + +75b41a20b0afeb4dd8fee3a43dbe11d5fbe34d38 OMAP: DSS2: Fix notifiers when swapping managers +ab01d99f8c1a13cee8f5ec190510be0fb8891937 OMAP: DSS2: Rename pending_notify to requested_events +14f79f34246c0550c4827f29f5879a51e613d320 OMAP: DSS2: Implement update notify for manual update display +4b59f2b284da06ec47d1b65ae08c18c00b3eca0f OMAP: DSS2: Implement support for more notification types. +e0ae3eb3aaa8ff6abc664a45e29814e8b8db1d3d OMAP: DSS2: use atomic notifiers +6308d1897ca03d511b0175c57333fed352e4284c OMAP: DSS2: return error values down to caller +7cad62ff19fda5289b5693c8a2296bb944f01006 OMAP: DSS2: Rename notify_go to notify +4a037a2c0d3f04a4af9e418eeeacf497ec2421b9 OMAP: DSS2: Use GO notifiers for wait_for_go() +b628480b180796ffa4f1a9d942e762d880d1e4d5 OMAP: DSS2: Add GO notifiers +82040c1e1f6747c3bf2bd228febc28cec44f6532 OMAP: DSS2: in_use flag for dss_cache +3bc782b2ed39f21fb406e38fdd31fd0e86e21718 OMAP: DSS2: Keep track whether overlay managers are enabled +7dbff8d6800f1af3bdd277c0cf4b398f993a20c2 OMAP: DSS2: Use spin_lock_irqsave/unlock_irqrestore in apply irq handler +--- + arch/arm/plat-omap/include/plat/display.h | 55 +++ + drivers/video/omap2/dss/dss.h | 2 + + drivers/video/omap2/dss/manager.c | 531 ++++++++++++++++++++++------- + drivers/video/omap2/dss/overlay.c | 7 + + 4 files changed, 470 insertions(+), 125 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h +index c915a66..488890e 100644 +--- a/arch/arm/plat-omap/include/plat/display.h ++++ b/arch/arm/plat-omap/include/plat/display.h +@@ -23,6 +23,7 @@ + #include <linux/list.h> + #include <linux/kobject.h> + #include <linux/device.h> ++#include <linux/notifier.h> + #include <asm/atomic.h> + + #define DISPC_IRQ_FRAMEDONE (1 << 0) +@@ -166,6 +167,48 @@ enum omap_overlay_manager_caps { + OMAP_DSS_OVL_MGR_CAP_DISPC = 1 << 0, + }; + ++/** ++ * Go event is triggered when all dss caches are clean (including shadow ++ * registers). ++ * ++ * This is used in xserver xv implementation to block writing to overlay until ++ * dss has completed reading same memory area. ++ * ++ * Example use in xv: ++ * If there is manual update triggered by gfx overlay first wait_for_go() ++ * doesn't block but wait_gfx() would block. ++ ** Frame 5 to first "buffer" ++ * wait_for_go() ++ * fill frame ++ * pan to first "buffer" ++ * update_window() for frame 1 ++ * request update notify ++ ** Frame 6 to second "buffer" (wait_gfx() would block here) ++ * wait_for_go() ++ * fill frame ++ * pan to second "buffer" ++ ** Frame 7 to first "buffer" ++ * wait_for_go() blocking ++ * First update completes ++ * wait_for_go() returns ++ * update notify arrives ++ * update_window() for frame 2 ++ * fill frame ++ * pan to third frame ++ * ++ * Update event is sent when manual update completes. Update event is not ++ * available for automatic update displays (returns -EINVAL). ++ */ ++enum omap_dss_notify_event { ++ OMAP_DSS_NOTIFY_NONE = 0 << 0, ++ OMAP_DSS_NOTIFY_GO_MGR = 1 << 0, ++ OMAP_DSS_NOTIFY_UPDATE_MGR = 2 << 0, ++ OMAP_DSS_NOTIFY_MASK_MGR = 3 << 0, ++ OMAP_DSS_NOTIFY_GO_OVL = 1 << 2, ++ OMAP_DSS_NOTIFY_UPDATE_OVL = 2 << 2, ++ OMAP_DSS_NOTIFY_MASK_OVL = 3 << 2, ++}; ++ + /* RFBI */ + + struct rfbi_timings { +@@ -297,6 +340,8 @@ struct omap_overlay { + struct omap_overlay_info *info); + + int (*wait_for_go)(struct omap_overlay *ovl); ++ int (*notify)(struct omap_overlay *ovl, ++ enum omap_dss_notify_event events); + }; + + struct omap_overlay_manager_info { +@@ -340,6 +385,8 @@ struct omap_overlay_manager { + + int (*apply)(struct omap_overlay_manager *mgr); + int (*wait_for_go)(struct omap_overlay_manager *mgr); ++ int (*notify)(struct omap_overlay_manager *mgr, ++ enum omap_dss_notify_event events); + int (*wait_for_vsync)(struct omap_overlay_manager *mgr); + + int (*enable)(struct omap_overlay_manager *mgr); +@@ -510,10 +557,18 @@ struct omap_overlay_manager *omap_dss_get_overlay_manager(int num); + int omap_dss_get_num_overlays(void); + struct omap_overlay *omap_dss_get_overlay(int num); + ++void omap_dss_lock_cache(void); ++void omap_dss_unlock_cache(void); ++ + void omapdss_default_get_resolution(struct omap_dss_device *dssdev, + u16 *xres, u16 *yres); + int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev); + ++int omap_dss_register_notifier(struct notifier_block *nb); ++int omap_dss_unregister_notifier(struct notifier_block *nb); ++ ++int omap_dss_request_notify(enum omap_dss_notify_event event, long value); ++ + typedef void (*omap_dispc_isr_t) (void *arg, u32 mask); + int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask); + int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask); +diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h +index 5c7940d..8d14d94 100644 +--- a/drivers/video/omap2/dss/dss.h ++++ b/drivers/video/omap2/dss/dss.h +@@ -198,6 +198,8 @@ void default_get_overlay_fifo_thresholds(enum omap_plane plane, + int dss_init_overlay_managers(struct platform_device *pdev); + void dss_uninit_overlay_managers(struct platform_device *pdev); + int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl); ++int dss_mgr_notify_ovl(struct omap_overlay *ovl, ++ enum omap_dss_notify_event events); + void dss_setup_partial_planes(struct omap_dss_device *dssdev, + u16 *x, u16 *y, u16 *w, u16 *h, + bool enlarge_update_area); +diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c +index 545e9b9..a66579c 100644 +--- a/drivers/video/omap2/dss/manager.c ++++ b/drivers/video/omap2/dss/manager.c +@@ -25,6 +25,7 @@ + #include <linux/kernel.h> + #include <linux/slab.h> + #include <linux/module.h> ++#include <linux/notifier.h> + #include <linux/platform_device.h> + #include <linux/spinlock.h> + #include <linux/jiffies.h> +@@ -416,6 +417,8 @@ struct overlay_cache_data { + u32 fifo_high; + + bool manual_update; ++ ++ enum omap_dss_notify_event requested_events; + }; + + struct manager_cache_data { +@@ -427,6 +430,8 @@ struct manager_cache_data { + * VSYNC/EVSYNC */ + bool shadow_dirty; + ++ bool enabled; ++ + u32 default_color; + + enum omap_dss_trans_key_type trans_key_type; +@@ -445,8 +450,13 @@ struct manager_cache_data { + /* enlarge the update area if the update area contains scaled + * overlays */ + bool enlarge_update_area; ++ bool in_use; ++ ++ enum omap_dss_notify_event requested_events; + }; + ++static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr); ++ + static struct { + spinlock_t lock; + struct overlay_cache_data overlay_cache[MAX_DSS_OVERLAYS]; +@@ -455,7 +465,156 @@ static struct { + bool irq_enabled; + } dss_cache; + ++static ATOMIC_NOTIFIER_HEAD(dss_notifier_list); + ++static int dss_notifier_call_chain(unsigned long val, void *v) ++{ ++ return atomic_notifier_call_chain(&dss_notifier_list, val, v); ++} ++ ++/** ++ * Check from events which should be fired now. ++ * ++ * @return: list of events that should fire now. ++ */ ++static enum omap_dss_notify_event dss_mgr_notify_check( ++ struct omap_overlay_manager *mgr, | ||
[-] [+] | Added | linux-2.6-EEM-support-for-g_nokia.patch ^ |
@@ -0,0 +1,87 @@ +From 81d22eedcfa63771c1bfc286a5363990da03747d Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Fri, 13 Aug 2010 10:32:08 +0300 +Subject: [PATCH 27/42] EEM support for g_nokia + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/usb/gadget/Kconfig | 16 ++++++++++++++++ + drivers/usb/gadget/nokia.c | 21 ++++++++++++++++++--- + 2 files changed, 34 insertions(+), 3 deletions(-) + +diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig +index 607d0db..49f9d51 100644 +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -851,6 +851,22 @@ config USB_G_NOKIA + It's only really useful for N900 hardware. If you're building + a kernel for N900, say Y or M here. If unsure, say N. + ++config USB_G_NOKIA_EEM ++ bool "Ethernet Emulation Model (EEM) support" ++ depends on USB_G_NOKIA ++ default n ++ help ++ CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM ++ and therefore can be supported by more hardware. Technically ECM and ++ EEM are designed for different applications. The ECM model extends ++ the network interface to the target (e.g. a USB cable modem), and the ++ EEM model is for mobile devices to communicate with hosts using ++ ethernet over USB. For Linux gadgets, however, the interface with ++ the host is the same (a usbX device), so the differences are minimal. ++ ++ If you say "y" here, the Ethernet gadget driver will use the EEM ++ protocol rather than ECM. If unsure, say "n". ++ + config USB_G_MULTI + tristate "Multifunction Composite Gadget (EXPERIMENTAL)" + depends on BLOCK && NET +diff --git a/drivers/usb/gadget/nokia.c b/drivers/usb/gadget/nokia.c +index b5364f9..77a66d5 100644 +--- a/drivers/usb/gadget/nokia.c ++++ b/drivers/usb/gadget/nokia.c +@@ -46,6 +46,7 @@ + #include "u_serial.c" + #include "f_acm.c" + #include "f_ecm.c" ++#include "f_eem.c" + #include "f_obex.c" + #include "f_serial.c" + #include "f_phonet.c" +@@ -97,6 +98,14 @@ static struct usb_device_descriptor device_desc = { + + /*-------------------------------------------------------------------------*/ + ++#ifdef CONFIG_USB_G_NOKIA_EEM ++static int use_eem = 1; ++#else ++static int use_eem; ++#endif ++module_param(use_eem, bool, 0); ++MODULE_PARM_DESC(use_eem, "use CDC EEM mode"); ++ + /* Module */ + MODULE_DESCRIPTION("Nokia composite gadget driver for N900"); + MODULE_AUTHOR("Felipe Balbi"); +@@ -126,9 +135,15 @@ static int __init nokia_bind_config(struct usb_configuration *c) + if (status) + printk(KERN_DEBUG "could not bind acm config\n"); + +- status = ecm_bind_config(c, hostaddr); +- if (status) +- printk(KERN_DEBUG "could not bind ecm config\n"); ++ if (use_eem) { ++ status = eem_bind_config(c); ++ if (status) ++ printk(KERN_DEBUG "could not bind eem config\n"); ++ } else { ++ status = ecm_bind_config(c, hostaddr); ++ if (status) ++ printk(KERN_DEBUG "could not bind ecm config\n"); ++ } + + return status; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-HACK-mfd-twl4030-power-disable-scripts.patch ^ |
@@ -0,0 +1,47 @@ +From 6284b8854ab7db3fdb6df2b2d1b8a61992ab6ec0 Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Fri, 15 Oct 2010 14:44:28 +0300 +Subject: [PATCH 33/42] HACK: mfd: twl4030-power: disable scripts + +Disable power scripts until we find a fix for N900 panel power on +problem. + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/mfd/twl4030-power.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c +index 13daf0d..fe43927 100644 +--- a/drivers/mfd/twl4030-power.c ++++ b/drivers/mfd/twl4030-power.c +@@ -562,13 +562,18 @@ static void twl4030_poweroff(void) + + void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts) + { ++/* ++ * HACK: We are not using power scripts since it causes issues while turning ++ * on panel on N900. ++ */ ++#if 0 + int err = 0; + int i; + struct twl4030_resconfig *resconfig; + u8 address = twl4030_start_script_address; +- ++#endif + pm_power_off = twl4030_poweroff; +- ++#if 0 + err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, + TWL4030_PM_MASTER_KEY_CFG1, + TWL4030_PM_MASTER_PROTECT_KEY); +@@ -620,4 +625,5 @@ resource: + if (err) + pr_err("TWL4030 failed to configure resource\n"); + return; ++#endif + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-HACK-sysfs_notify-support-for-isp1704-charger-driver.patch ^ |
@@ -0,0 +1,42 @@ +From 344d073681e22c494b1b2f1d781bb5a2e4356139 Mon Sep 17 00:00:00 2001 +From: Srikar <ext-srikar.1.bhavanarayana@nokia.com> +Date: Thu, 30 Dec 2010 15:11:11 +0200 +Subject: [PATCH 36/42] HACK: sysfs_notify support for isp1704 charger driver + +Needed for N900 BME (battery management entity). +--- + drivers/power/isp1704_charger.c | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c +index 441e8cc..44c92c6 100644 +--- a/drivers/power/isp1704_charger.c ++++ b/drivers/power/isp1704_charger.c +@@ -216,6 +216,10 @@ static void isp1704_charger_work(struct work_struct *data) + struct isp1704_charger *isp = + container_of(data, struct isp1704_charger, work); + static DEFINE_MUTEX(lock); ++ unsigned online_old = isp->online; ++ unsigned present_old = isp->present; ++ unsigned current_max_old = isp->current_max; ++ + event = isp->event; + power = isp->max_power; + +@@ -282,6 +286,13 @@ static void isp1704_charger_work(struct work_struct *data) + power_supply_changed(&isp->psy); + out: + mutex_unlock(&lock); ++ ++ if (isp->online != online_old) ++ sysfs_notify(&isp->psy.dev->kobj, NULL, "online"); ++ if (isp->present != present_old) ++ sysfs_notify(&isp->psy.dev->kobj, NULL, "present"); ++ if (isp->current_max != current_max_old) ++ sysfs_notify(&isp->psy.dev->kobj, NULL, "current_max"); + } + + static int isp1704_notifier_call(struct notifier_block *nb, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-HSI-CMT-patcheset-incl.-fixes-bmc-7505-bmc-9563.patch ^ |
@@ -0,0 +1,7769 @@ +From 6ab571176d05f323e626827d972a6b11c74c4059 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Thu, 27 Jan 2011 15:02:42 +0200 +Subject: [PATCH 34/42] HSI: CMT: patcheset (incl. fixes bmc#7505, bmc#9563) + +Consists of the following patches: + +d577d9b7be3059602c472dc86d5e4b529a5b882a HSI: cmt_speech: return error if HSI port not configured +1bbc6dfcaaba7f0cbe3847c40c42ddee8216fc3d HSI: ssip: add ssip_slave_running() to ssi_protocol interface +8562eaa902c1fabb5d90a2611cfa68b0ad1a9c87 HSI: cmt_speech: avoid GFP_ATOMIC in cs_char_open +f2726a3ed90aba733f984aa8e556862b7530a1be board-rx51: set cmt_rst_ind_flags +c3047210d48c6b9afb4e976b40241ff2be9997d8 CMT: Add field for irq flags to driver platform data +9e7fcfab4574771ec2874fcc393de0d468c15fcc HSI: cmt_speech: Add CMT_SPEECH driver +fd2b3d10f9c5b32887f8b889127742008acd5550 HSI: cmt_speech: Add CMT SPEECH to the configuration +688ae895a2c91dff7a8a92273d357659950a0559 HSI: hsi_char: API fix for 2.6.36 +87c3a2e4324a9a2dec335f98dfe91f487747c39a HSI: ssip: Introducing SSI protocol (aka McSAAB) +1b180997341de72f4d08598488beff5131fd817f rx51: Add SSI related support to board +00f90e57113a720c547adf3aad91f6a6879f0255 CMT: Add Nokia CMT driver to the configuration +c1d8056df7376ae73148bb2e624b477cb09f908f CMT: Introduces the Nokia CMT driver. +660810ec9ef0eaa7c60297d036d6d478f7de3f88 HSI: ssip: Add SSI protocol to the kernel configuration +43c504505faae555205a1e8c5e476c49b93d925c HSI: Add HSI API documentation +9c3b6b43112fa6eeb9a5776dac455d8631778fd0 HSI: hsi_char: Add HSI char device kernel configuration +a82f295b4aad0fbe026fadaa952d67301fd6d724 HSI: hsi_char: Add HSI char device driver +28f2fe57afcc0cc7c3b1c85bc3e2c0d3b8f0d5dd HSI: omap_ssi: Add OMAP SSI to the kernel configuration +072978f0952144a5626b29e1319368a039981537 HSI: omap_ssi: Introducing OMAP SSI driver +03db6800c1ccbb5514ca38d658e5c01144a06eb1 HSI: Introducing HSI framework +--- + Documentation/DocBook/device-drivers.tmpl | 17 + + arch/arm/mach-omap2/Makefile | 3 + + arch/arm/mach-omap2/board-rx51-peripherals.c | 67 + + arch/arm/mach-omap2/ssi.c | 139 ++ + arch/arm/plat-omap/include/plat/ssi.h | 204 +++ + drivers/Kconfig | 2 + + drivers/Makefile | 1 + + drivers/hsi/Kconfig | 16 + + drivers/hsi/Makefile | 5 + + drivers/hsi/clients/Kconfig | 32 + + drivers/hsi/clients/Makefile | 7 + + drivers/hsi/clients/cmt_speech.c | 1440 ++++++++++++++++++++ + drivers/hsi/clients/hsi_char.c | 1053 +++++++++++++++ + drivers/hsi/clients/ssi_protocol.c | 1160 ++++++++++++++++ + drivers/hsi/controllers/Kconfig | 21 + + drivers/hsi/controllers/Makefile | 5 + + drivers/hsi/controllers/omap_ssi.c | 1819 ++++++++++++++++++++++++++ + drivers/hsi/hsi.c | 515 ++++++++ + drivers/misc/Kconfig | 1 + + drivers/misc/Makefile | 1 + + drivers/misc/cmt/Kconfig | 9 + + drivers/misc/cmt/Makefile | 5 + + drivers/misc/cmt/cmt.c | 227 ++++ + include/linux/Kbuild | 1 + + include/linux/cmt.h | 55 + + include/linux/cs-protocol.h | 116 ++ + include/linux/hsi/Kbuild | 1 + + include/linux/hsi/hsi.h | 376 ++++++ + include/linux/hsi/hsi_char.h | 66 + + include/linux/hsi/omap_ssi_hack.h | 37 + + include/linux/hsi/ssip_slave.h | 40 + + 31 files changed, 7441 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/ssi.c + create mode 100644 arch/arm/plat-omap/include/plat/ssi.h + create mode 100644 drivers/hsi/Kconfig + create mode 100644 drivers/hsi/Makefile + create mode 100644 drivers/hsi/clients/Kconfig + create mode 100644 drivers/hsi/clients/Makefile + create mode 100644 drivers/hsi/clients/cmt_speech.c + create mode 100644 drivers/hsi/clients/hsi_char.c + create mode 100644 drivers/hsi/clients/ssi_protocol.c + create mode 100644 drivers/hsi/controllers/Kconfig + create mode 100644 drivers/hsi/controllers/Makefile + create mode 100644 drivers/hsi/controllers/omap_ssi.c + create mode 100644 drivers/hsi/hsi.c + create mode 100644 drivers/misc/cmt/Kconfig + create mode 100644 drivers/misc/cmt/Makefile + create mode 100644 drivers/misc/cmt/cmt.c + create mode 100644 include/linux/cmt.h + create mode 100644 include/linux/cs-protocol.h + create mode 100644 include/linux/hsi/Kbuild + create mode 100644 include/linux/hsi/hsi.h + create mode 100644 include/linux/hsi/hsi_char.h + create mode 100644 include/linux/hsi/omap_ssi_hack.h + create mode 100644 include/linux/hsi/ssip_slave.h + +diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl +index 22edcbb..877028a 100644 +--- a/Documentation/DocBook/device-drivers.tmpl ++++ b/Documentation/DocBook/device-drivers.tmpl +@@ -433,4 +433,21 @@ X!Idrivers/video/console/fonts.c + !Edrivers/i2c/i2c-core.c + </chapter> + ++ <chapter id="hsi"> ++ <title>High Speed Synchronous Serial Interface (HSI)</title> ++ ++ <para> ++ High Speed Synchronous Serial Interface (HSI) is a ++ serial interface mainly used for connecting application ++ engines (APE) with cellular modem engines (CMT) in cellular ++ handsets. ++ ++ HSI provides multiplexing for up to 16 logical channels, ++ low-latency and full duplex communication. ++ </para> ++ ++!Iinclude/linux/hsi/hsi.h ++!Edrivers/hsi/hsi.c ++ </chapter> ++ + </book> +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 60e51bc..6e0238b 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -112,6 +112,9 @@ ifneq ($(CONFIG_TIDSPBRIDGE),) + obj-y += dsp.o + endif + ++omap-ssi-$(CONFIG_OMAP_SSI) := ssi.o ++obj-y += $(omap-ssi-m) $(omap-ssi-y) ++ + # Specific board support + obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o + obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index cc41c9c..6ecd0f8 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -28,6 +28,9 @@ + #include <linux/bluetooth/hci_h4p.h> + #include <media/radio-si4713.h> + #include <media/si4713.h> ++#include <linux/hsi/hsi.h> ++#include <linux/cmt.h> ++#include <linux/irq.h> + + #include <plat/mcspi.h> + #include <plat/board.h> +@@ -37,6 +40,7 @@ + #include <plat/onenand.h> + #include <plat/gpmc-smc91x.h> + #include <plat/serial.h> ++#include <plat/ssi.h> + + #include <mach/board-rx51.h> + +@@ -1256,6 +1260,67 @@ fail: + printk(KERN_ERR "Bluetooth device registration failed\n"); + } + ++static struct cmt_platform_data rx51_cmt_pdata = { ++ .cmt_rst_ind_gpio = 72, ++ .cmt_rst_ind_flags = IRQF_TRIGGER_FALLING, ++}; ++ ++static struct platform_device rx51_cmt_device = { ++ .name = "cmt", ++ .id = -1, ++ .dev = { ++ .platform_data = &rx51_cmt_pdata, ++ }, ++}; ++ ++static void __init rx51_cmt_init(void) ++{ ++ int err; ++ ++ err = platform_device_register(&rx51_cmt_device); ++ if (err < 0) ++ pr_err("Could not register CMT device\n"); ++} ++ ++static struct omap_ssi_board_config __initdata rx51_ssi_config = { ++ .num_ports = 1, ++ .cawake_gpio = { 151 }, ++}; ++ ++static struct hsi_board_info __initdata rx51_ssi_cl[] = { ++ [0] = { ++ .name = "hsi_char", ++ .hsi_id = 0, ++ .port = 0, ++ }, ++ [1] = { ++ .name = "ssi_protocol", ++ .hsi_id = 0, ++ .port = 0, ++ .tx_cfg = { ++ .mode = HSI_MODE_FRAME, ++ .channels = 4, ++ .speed = 55000, ++ .arb_mode = HSI_ARB_RR, ++ }, ++ .rx_cfg = { ++ .mode = HSI_MODE_FRAME, ++ .channels = 4, ++ }, ++ }, ++ [2] = { ++ .name = "cmt_speech", | ||
[-] [+] | Added | linux-2.6-N900-Set-keypad-slide-gpio-as-active-low.patch ^ |
@@ -0,0 +1,26 @@ +From 7e85e6019adb1299c7e8d76c0920be44641784a1 Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Thu, 30 Sep 2010 16:58:49 +0300 +Subject: [PATCH 31/42] N900: Set keypad slide gpio as active low + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index d528848..cc41c9c 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -322,7 +322,7 @@ static struct gpio_keys_button rx51_gpio_keys[] = { + .type = EV_SW, + .code = SW_KEYPAD_SLIDE, + .gpio = RX51_GPIO_KEYPAD_SLIDE, +- .active_low = 1, ++ .active_low = 0, + .debounce_interval = RX51_GPIO_DEBOUNCE_TIMEOUT, + }, { + .desc = "Proximity Sensor", +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-N900-musb-fix-regulator-init-at-boot.patch ^ |
@@ -0,0 +1,49 @@ +From 471cf04dc1c346c42eb9bc1d8290ced894367885 Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Tue, 12 Apr 2011 11:49:14 +0300 +Subject: [PATCH] N900: musb: fix regulator init at boot + +The omap2430 otg driver did a musb_platform_resume at init +which caused also usb regulators to be enabled, which +was unnecessary and caused the regulators to consume lot +of power until usb cable was plugged in. + +Fixed by doing a specific only the needed init work instead +of full musb_platform_resume. + +Similar patch already available in upstream 2.6.38, so this +patch is not needed in next kernel version. See here: + +http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6. +git;a=commitdiff;h=c20aebb92796cf54ae8171ad7f53a8fa7c61d2d8 + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + drivers/usb/musb/omap2430.c | 11 ++++++++++- + 1 files changed, 10 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c +index ed618bd..0004e5c 100644 +--- a/drivers/usb/musb/omap2430.c ++++ b/drivers/usb/musb/omap2430.c +@@ -202,7 +202,16 @@ int __init musb_platform_init(struct musb *musb, void *board_data) + return -ENODEV; + } + +- musb_platform_resume(musb); ++ if (musb->clock) { ++ if (musb->set_clock) ++ musb->set_clock(musb->clock, 1); ++ else ++ clk_enable(musb->clock); ++ ++ l = musb_readl(musb->mregs, OTG_FORCESTDBY); ++ l &= ~ENABLEFORCE; /* disable MSTANDBY */ ++ musb_writel(musb->mregs, OTG_FORCESTDBY, l); ++ } + + l = musb_readl(musb->mregs, OTG_SYSCONFIG); + l &= ~ENABLEWAKEUP; /* disable wakeup */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-OMAP2-3-PRCM-export-cm_read_mod_reg-and-cm_write_mod.patch ^ |
@@ -0,0 +1,36 @@ +From c398a7c0d70eceee7347fa12c96aaec9a09e3a71 Mon Sep 17 00:00:00 2001 +From: Kai Vehmanen <kai.vehmanen@nokia.com> +Date: Thu, 10 Jun 2010 14:13:16 +0300 +Subject: [PATCH 26/42] OMAP2/3 PRCM: export cm_read_mod_reg and cm_write_mod_reg + +Export functions needed by the OMAP HSI driver. + +Partially reverts 42d75e7df324268c99153d9cc7d48e780b54d059. + +Signed-off-by: Kai Vehmanen <kai.vehmanen@nokia.com> +--- + arch/arm/mach-omap2/prcm.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c +index a51846e..dded05e 100644 +--- a/arch/arm/mach-omap2/prcm.c ++++ b/arch/arm/mach-omap2/prcm.c +@@ -245,12 +245,14 @@ u32 cm_read_mod_reg(s16 module, u16 idx) + { + return __omap_prcm_read(cm_base, module, idx); + } ++EXPORT_SYMBOL(cm_read_mod_reg); + + /* Write into a register in a CM module */ + void cm_write_mod_reg(u32 val, s16 module, u16 idx) + { + __omap_prcm_write(val, cm_base, module, idx); + } ++EXPORT_SYMBOL(cm_write_mod_reg); + + /* Read-modify-write a register in a CM module. Caller must lock */ + u32 cm_rmw_mod_reg_bits(u32 mask, u32 bits, s16 module, s16 idx) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-OMAP2-3-clock-implement-clock-rate-parent-change-not.patch ^ |
@@ -0,0 +1,433 @@ +From 1a5d80052fb55efd073b8fa86a7e97517a27b1fa Mon Sep 17 00:00:00 2001 +From: Paul Walmsley <paul@pwsan.com> +Date: Mon, 19 Oct 2009 19:27:59 +0300 +Subject: [PATCH 06/42] OMAP2/3 clock: implement clock rate/parent change notifiers + +Patch-Mainline: Not sure + +This patch allows core code and driver code to register for +notification when a clock's rate or parent changes. These are useful +because drivers don't have exclusive control over a clock's rate: +power management code (e.g., CPUFreq) may cause rate changes across +large parts of the clock tree. + +There are three notifier messages: + +1. a pre-change notifier, called before the change; + +2. a post-change notifier, called after the change; and + +3. an abort notifier, called if the change fails for any reason after + the pre-change notifier callbacks have run. + +Since the implementation uses a blocking notifier, notifier code may +block waiting for devices to quiesce; but long delays here will reduce +the effectiveness of DVFS. Since notifier callbacks are called with +clocks_mutex held, callback code must not re-enter the clock framework. + +Pre-change notifiers are passed the current clock rate and the +post-change notifiers the new clock rate. The notifiers are called even +if the clock rate is the same before and after the change. This is +because reprogramming a clock's parent or rate may briefly disrupt the +clock. + +There are likely to be few users of these notifiers, compared to the +total number of clocks. So, rather than storing one notifier per +struct clk, notifiers are stored in a separate, dynamically allocated +list, effectively trading execution speed (in terms of a sequential +scan of the notifier list) for memory savings. The implementation is +completely hidden from the callbacks and can be easily changed. + +Until prototypes for these functions are made available in +include/linux/clk.h, drivers should pass function pointers to +clk_notifier_register() and clk_notifier_unregister() via their +platform_data struct. + +This patch is a collaboration between Tero Kristo +<tero.kristo@nokia.com> and Paul Walmsley <paul@pwsan.com> and several +others. Hiroshi Doyu <Hiroshi.DOYU@nokia.com> tracked down and fixed a +bug where blocking_notifier_chain_*() were called while interrupts +were disabled. Nishanth Menon <nm@ti.com> found and fixed a bug in +the clk_notifier_unregister() path, where a list_del() was missing. +And thanks to Jouni Hogander <jouni.hogander@nokia.com> for comments +and review during the evolution of these patches. + +Signed-off-by: Paul Walmsley <paul@pwsan.com> +Signed-off-by: Tero Kristo <tero.kristo@nokia.com> +--- + arch/arm/plat-omap/clock.c | 206 +++++++++++++++++++++++++++++++ + arch/arm/plat-omap/include/plat/clock.h | 62 +++++++++ + 2 files changed, 268 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c +index fc62fb5..89dd5f9 100644 +--- a/arch/arm/plat-omap/clock.c ++++ b/arch/arm/plat-omap/clock.c +@@ -21,6 +21,7 @@ + #include <linux/cpufreq.h> + #include <linux/debugfs.h> + #include <linux/io.h> ++#include <linux/slab.h> + + #include <plat/clock.h> + +@@ -29,6 +30,78 @@ static DEFINE_MUTEX(clocks_mutex); + static DEFINE_SPINLOCK(clockfw_lock); + + static struct clk_functions *arch_clock; ++static LIST_HEAD(clk_notifier_list); ++ ++/* ++ * _clk_free_notifier_chain - safely remove struct clk_notifier ++ * @cn: struct clk_notifier * ++ * ++ * Removes the struct clk_notifier @cn from the clk_notifier_list and ++ * frees it. ++ */ ++static void _clk_free_notifier_chain(struct clk_notifier *cn) ++{ ++ list_del(&cn->node); ++ kfree(cn); ++} ++ ++/* ++ * omap_clk_notify - call clk notifier chain ++ * @clk: struct clk * that is changing rate ++ * @msg: clk notifier type (i.e., CLK_POST_RATE_CHANGE; see mach/clock.h) ++ * @old_rate: old rate ++ * @new_rate: new rate ++ * ++ * Triggers a notifier call chain on the post-clk-rate-change notifier ++ * for clock 'clk'. Passes a pointer to the struct clk and the ++ * previous and current rates to the notifier callback. Intended to be ++ * called by internal clock code only. No return value. ++ */ ++static void omap_clk_notify(struct clk *clk, unsigned long msg) ++{ ++ struct clk_notifier *cn; ++ struct clk_notifier_data cnd; ++ ++ cnd.clk = clk; ++ cnd.rate = clk->rate; ++ ++ list_for_each_entry(cn, &clk_notifier_list, node) { ++ if (cn->clk == clk) { ++ blocking_notifier_call_chain(&cn->notifier_head, msg, ++ &cnd); ++ break; ++ } ++ } ++} ++ ++/* ++ * omap_clk_notify_downstream - trigger clock change notifications ++ * @clk: struct clk * to start the notifications with ++ * @msg: notifier msg - see "Clk notifier callback types" in mach/clock.h ++ * ++ * Call clock change notifiers on clocks starting with @clk and including ++ * all of @clk's downstream children clocks. Returns NOTIFY_DONE. ++ */ ++static int omap_clk_notify_downstream(struct clk *clk, unsigned long msg) ++{ ++ struct clk *child; ++ int ret; ++ ++ if (!clk->notifier_count) ++ return NOTIFY_DONE; ++ ++ omap_clk_notify(clk, msg); ++ ++ if (list_empty(&clk->children)) ++ return NOTIFY_DONE; ++ ++ list_for_each_entry(child, &clk->children, sibling) { ++ ret = omap_clk_notify_downstream(child, msg); ++ if (ret) ++ break; ++ } ++ return ret; ++} + + /* + * Standard clock functions defined in include/linux/clk.h +@@ -115,10 +188,16 @@ int clk_set_rate(struct clk *clk, unsigned long rate) + { + unsigned long flags; + int ret = -EINVAL; ++ int msg; + + if (clk == NULL || IS_ERR(clk)) + return ret; + ++ mutex_lock(&clocks_mutex); ++ ++ if (clk->notifier_count) ++ omap_clk_notify_downstream(clk, CLK_PRE_RATE_CHANGE); ++ + spin_lock_irqsave(&clockfw_lock, flags); + if (arch_clock->clk_set_rate) + ret = arch_clock->clk_set_rate(clk, rate); +@@ -129,6 +208,12 @@ int clk_set_rate(struct clk *clk, unsigned long rate) + } + spin_unlock_irqrestore(&clockfw_lock, flags); + ++ msg = (ret) ? CLK_ABORT_RATE_CHANGE : CLK_POST_RATE_CHANGE; ++ ++ omap_clk_notify_downstream(clk, msg); ++ ++ mutex_unlock(&clocks_mutex); ++ + return ret; + } + EXPORT_SYMBOL(clk_set_rate); +@@ -137,10 +222,16 @@ int clk_set_parent(struct clk *clk, struct clk *parent) + { + unsigned long flags; + int ret = -EINVAL; ++ int msg; + + if (clk == NULL || IS_ERR(clk) || parent == NULL || IS_ERR(parent)) + return ret; + ++ mutex_lock(&clocks_mutex); ++ ++ if (clk->notifier_count) ++ omap_clk_notify_downstream(clk, CLK_PRE_RATE_CHANGE); ++ + spin_lock_irqsave(&clockfw_lock, flags); + if (clk->usecount == 0) { + if (arch_clock->clk_set_parent) | ||
[-] [+] | Added | linux-2.6-OMAP3-DSS-allow-board-specific-SDI-pin-muxing.patch ^ |
@@ -0,0 +1,125 @@ +From b6a5e77a9d9f7b506828809f789d203b45515dbb Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 18 Apr 2011 15:34:15 +0300 +Subject: [PATCH] OMAP3: DSS: allow board specific SDI pin muxing + +The SDI block in OMAP3430 SoC leaks statically 1,6mA +of current if there is power available at VSDI_CSI power +rail. This can be stopped if the regulator is shut down. +However, on some boards, the other blocks powered by +VSDI_CSI rail cannot be shut down, hence a new mechanism +is needed to allow the leakage to be blocked. + +This patch introduces a mechanism for boards to pass +function pointers to alter the pin muxing correctly +when the SDI is powered on/off to block the current leak. + +Loosely based on patch by Imre Deak for Nokia N900 maemo +kernel. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/plat-omap/include/plat/display.h | 2 ++ + drivers/video/omap2/dss/core.c | 2 +- + drivers/video/omap2/dss/dss.h | 4 ++-- + drivers/video/omap2/dss/sdi.c | 14 +++++++++++++- + 4 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h +index 488890e..dc63994 100644 +--- a/arch/arm/plat-omap/include/plat/display.h ++++ b/arch/arm/plat-omap/include/plat/display.h +@@ -258,6 +258,8 @@ int dsi_vc_send_bta_sync(int channel); + /* Board specific data */ + struct omap_dss_board_info { + int (*get_last_off_on_transaction_id)(struct device *dev); ++ /* set pin multiplexing (pad configuration) when powering on/off */ ++ void (*set_mux)(int on); + int num_devices; + struct omap_dss_device **devices; + struct omap_dss_device *default_device; +diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c +index 8e89f60..d2d12e1 100644 +--- a/drivers/video/omap2/dss/core.c ++++ b/drivers/video/omap2/dss/core.c +@@ -554,7 +554,7 @@ static int omap_dss_probe(struct platform_device *pdev) + } + + if (cpu_is_omap34xx()) { +- r = sdi_init(skip_init); ++ r = sdi_init(pdata, skip_init); + if (r) { + DSSERR("Failed to initialize SDI\n"); + goto err_sdi; +diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h +index 8d14d94..4049c63 100644 +--- a/drivers/video/omap2/dss/dss.h ++++ b/drivers/video/omap2/dss/dss.h +@@ -246,11 +246,11 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck, + + /* SDI */ + #ifdef CONFIG_OMAP2_DSS_SDI +-int sdi_init(bool skip_init); ++int sdi_init(struct omap_dss_board_info *pdata, bool skip_init); + void sdi_exit(void); + int sdi_init_display(struct omap_dss_device *display); + #else +-static inline int sdi_init(bool skip_init) ++static inline int sdi_init(struct omap_dss_board_info *pdata, bool skip_init) + { + return 0; + } +diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c +index ee07a3c..7f2dcdf 100644 +--- a/drivers/video/omap2/dss/sdi.c ++++ b/drivers/video/omap2/dss/sdi.c +@@ -33,8 +33,13 @@ static struct { + bool skip_init; + bool update_enabled; + struct regulator *vdds_sdi_reg; ++ void (*set_mux)(int on); + } sdi; + ++static void sdi_mux_null(int on) ++{ ++} ++ + static void sdi_basic_init(void) + { + dispc_set_parallel_interface_mode(OMAP_DSS_PARALLELMODE_BYPASS); +@@ -64,6 +69,8 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) + if (r) + goto err1; + ++ sdi.set_mux(1); ++ + /* In case of skip_init sdi_init has already enabled the clocks */ + if (!sdi.skip_init) + dss_clk_enable(DSS_CLK_ICK | DSS_CLK_FCK1); +@@ -143,6 +150,7 @@ void omapdss_sdi_display_disable(struct omap_dss_device *dssdev) + + dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK1); + ++ sdi.set_mux(0); + regulator_disable(sdi.vdds_sdi_reg); + + omap_dss_stop_device(dssdev); +@@ -156,10 +164,14 @@ int sdi_init_display(struct omap_dss_device *dssdev) + return 0; + } + +-int sdi_init(bool skip_init) ++int sdi_init(struct omap_dss_board_info *pdata, bool skip_init) + { + /* we store this for first display enable, then clear it */ + sdi.skip_init = skip_init; ++ if (pdata->set_mux) ++ sdi.set_mux = pdata->set_mux; ++ else ++ sdi.set_mux = &sdi_mux_null; + + sdi.vdds_sdi_reg = dss_get_vdds_sdi(); + if (IS_ERR(sdi.vdds_sdi_reg)) { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-OMAP3-ISP-Add-regulator-control-for-omap34xx.patch ^ |
@@ -0,0 +1,96 @@ +From 2186fb3d23692530ed80780de930225ff97cbd6c Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 2 May 2011 14:06:13 +0300 +Subject: [PATCH] OMAP3: ISP: Add regulator control for omap34xx + +The current omap3isp driver is missing regulator handling +for CSIb complex in omap34xx based devices. This patch +adds a mechanism for this to the omap3isp driver. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + drivers/media/video/omap3isp/ispccp2.c | 24 +++++++++++++++++++++++- + drivers/media/video/omap3isp/ispccp2.h | 1 + + 2 files changed, 24 insertions(+), 1 deletions(-) + +diff --git a/drivers/media/video/omap3isp/ispccp2.c b/drivers/media/video/omap3isp/ispccp2.c +index 0e16cab..3b17b0d 100644 +--- a/drivers/media/video/omap3isp/ispccp2.c ++++ b/drivers/media/video/omap3isp/ispccp2.c +@@ -30,6 +30,7 @@ + #include <linux/module.h> + #include <linux/mutex.h> + #include <linux/uaccess.h> ++#include <linux/regulator/consumer.h> + + #include "isp.h" + #include "ispreg.h" +@@ -163,6 +164,9 @@ static void ccp2_if_enable(struct isp_ccp2_device *ccp2, u8 enable) + struct isp_pipeline *pipe = to_isp_pipeline(&ccp2->subdev.entity); + int i; + ++ if (enable && ccp2->vdds_csib) ++ regulator_enable(ccp2->vdds_csib); ++ + /* Enable/Disable all the LCx channels */ + for (i = 0; i < CCP2_LCx_CHANS_NUM; i++) + isp_reg_clr_set(isp, OMAP3_ISP_IOMEM_CCP2, ISPCCP2_LCx_CTRL(i), +@@ -186,6 +190,8 @@ static void ccp2_if_enable(struct isp_ccp2_device *ccp2, u8 enable) + ISPCCP2_LC01_IRQENABLE, + ISPCCP2_LC01_IRQSTATUS_LC0_FS_IRQ); + } ++ if (!enable && ccp2->vdds_csib) ++ regulator_disable(ccp2->vdds_csib); + } + + /* +@@ -1137,6 +1143,10 @@ error: + */ + void omap3isp_ccp2_cleanup(struct isp_device *isp) + { ++ struct isp_ccp2_device *ccp2 = &isp->isp_ccp2; ++ ++ if (isp->revision == ISP_REVISION_2_0) ++ regulator_put(ccp2->vdds_csib); + } + + /* +@@ -1155,10 +1165,22 @@ int omap3isp_ccp2_init(struct isp_device *isp) + * the CSI2c or CSI2a receivers. The PHY then needs to be explicitly + * configured. + * ++ * On the OMAP34xx the CSI1/CCB is operated in the CSIb IO complex, ++ * which is powered by vdds_csib power rail. Hence the request for ++ * the regulator. ++ * + * TODO: Don't hardcode the usage of PHY1 (shared with CSI2c). + */ +- if (isp->revision == ISP_REVISION_15_0) ++ if (isp->revision == ISP_REVISION_15_0) { + ccp2->phy = &isp->isp_csiphy1; ++ } else if (isp->revision == ISP_REVISION_2_0) { ++ ccp2->vdds_csib = regulator_get(isp->dev, "vdds_csib"); ++ if (IS_ERR(ccp2->vdds_csib)) { ++ dev_dbg(isp->dev, ++ "Could not get regulator vdds_csib\n"); ++ ccp2->vdds_csib = NULL; ++ } ++ } + + ret = ccp2_init_entities(ccp2); + if (ret < 0) +diff --git a/drivers/media/video/omap3isp/ispccp2.h b/drivers/media/video/omap3isp/ispccp2.h +index 5505a86..6674e9d 100644 +--- a/drivers/media/video/omap3isp/ispccp2.h ++++ b/drivers/media/video/omap3isp/ispccp2.h +@@ -81,6 +81,7 @@ struct isp_ccp2_device { + struct isp_interface_mem_config mem_cfg; + struct isp_video video_in; + struct isp_csiphy *phy; ++ struct regulator *vdds_csib; + unsigned int error; + enum isp_pipeline_stream_state state; + wait_queue_head_t wait; +-- +1.7.3.4 + | ||
[-] [+] | Added | linux-2.6-OMAP3-RX-51-define-vdds_csib-regulator-supply.patch ^ |
@@ -0,0 +1,45 @@ +From 1a7e01f01a4af807206de0d26f059c3459f3a1fb Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 2 May 2011 14:06:14 +0300 +Subject: [PATCH 2/3] OMAP3: RX-51: define vdds_csib regulator supply + +The RX-51 uses the CSIb IO complex for camera operation. The +board file is missing definition for the regulator supplying +the CSIb complex, so this is added for better power +management. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 9319bae..a3a5109 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -525,6 +525,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = { + static struct regulator_consumer_supply rx51_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); + ++static struct regulator_consumer_supply rx51_vaux2_supplies[] = { ++ REGULATOR_SUPPLY("vdds_csib", "omap3isp"), ++ { ++ .supply = "vaux2", ++ }, ++}; ++ + static struct regulator_consumer_supply rx51_vaux3_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); + +@@ -599,6 +606,8 @@ static struct regulator_init_data rx51_vaux2 = { + .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, ++ .num_consumer_supplies = ARRAY_SIZE(rx51_vaux2_supplies), ++ .consumer_supplies = rx51_vaux2_supplies, + }; + + /* VAUX3 - adds more power to VIO_18 rail */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-OMAP3-rx-51-Add-full-regulator-definitions.patch ^ |
@@ -0,0 +1,129 @@ +From fd0166db894cf3ffdf47e85711d09a1819f4eaaa Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 2 May 2011 14:06:15 +0300 +Subject: [PATCH 3/3] OMAP3: rx-51: Add full regulator definitions + +The vaux2 (VCSI) regulator is left on by the bootloader +in rx-51. Since there the product has shipped and there +won't be any bootloader updates to fix this issue, we +need to define all the regulators and declare full +constraints for the regulator FW. This will allow the +regulator FW to disable unused regulators. + +Also this helps in adding more fine grain regulator +support for rx-51 in the future. + +Thanks for Mark Brown for pointing out the correct +solution. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 69 ++++++++++++++++++++++++++ + 1 files changed, 69 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index a3a5109..482fc3a 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -694,6 +694,32 @@ static struct regulator_init_data rx51_vmmc2 = { + .consumer_supplies = rx51_vmmc2_supplies, + }; + ++static struct regulator_init_data rx51_vpll1 = { ++ .constraints = { ++ .name = "VPLL", ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .always_on = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE, ++ }, ++}; ++ ++static struct regulator_init_data rx51_vpll2 = { ++ .constraints = { ++ .name = "VSDI_CSI", ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .always_on = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE, ++ }, ++}; ++ + static struct regulator_init_data rx51_vsim = { + .constraints = { + .name = "VMMC2_IO_18", +@@ -740,6 +766,43 @@ static struct regulator_init_data rx51_vio = { + .consumer_supplies = rx51_vio_supplies, + }; + ++static struct regulator_init_data rx51_vintana1 = { ++ .constraints = { ++ .name = "VINTANA1", ++ .min_uV = 1500000, ++ .max_uV = 1500000, ++ .always_on = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE, ++ }, ++}; ++ ++static struct regulator_init_data rx51_vintana2 = { ++ .constraints = { ++ .name = "VINTANA2", ++ .min_uV = 2750000, ++ .max_uV = 2750000, ++ .apply_uV = true, ++ .always_on = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE, ++ }, ++}; ++ ++static struct regulator_init_data rx51_vintdig = { ++ .constraints = { ++ .name = "VINTDIG", ++ .min_uV = 1500000, ++ .max_uV = 1500000, ++ .always_on = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE, ++ }, ++}; ++ + static struct si4713_platform_data rx51_si4713_i2c_data = { + .gpio_reset = RX51_FMTX_RESET_GPIO, + }; +@@ -989,8 +1052,13 @@ static struct twl4030_platform_data rx51_twldata __initdata = { + .vaux2 = &rx51_vaux2, + .vaux4 = &rx51_vaux4, + .vmmc1 = &rx51_vmmc1, ++ .vpll1 = &rx51_vpll1, ++ .vpll2 = &rx51_vpll2, + .vsim = &rx51_vsim, + .vdac = &rx51_vdac, ++ .vintana1 = &rx51_vintana1, ++ .vintana2 = &rx51_vintana2, ++ .vintdig = &rx51_vintdig, + .vio = &rx51_vio, + }; + +@@ -1429,6 +1497,7 @@ static void __init rx51_ssi_init(void) + void __init rx51_peripherals_init(void) + { + rx51_i2c_init(); ++ regulator_has_full_constraints(); + board_onenand_init(); + board_smc91x_init(); + rx51_add_gpio_keys(); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-PM-export-missing-symbols.patch ^ |
@@ -0,0 +1,56 @@ +From e2ebbcbb2d22acff96a942c9d42e31ba2eb34ad6 Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Sun, 29 Nov 2009 19:38:37 +0200 +Subject: [PATCH 07/42] PM: export missing symbols + +Patch-Mainline: never as this is a temporary hack + +Needed by the PVR driver. + +This patch is combined version of the following patches + +1. PM: export clk_notifier_{register/unregister} +2. PM: export omap_pm_set_min_bus_tput + +Signed-off-by: Imre Deak <imre.deak@nokia.com> +Signed-off-by: Roger Quadros <roger.quadros@nokia.com> +--- + arch/arm/plat-omap/clock.c | 2 ++ + arch/arm/plat-omap/omap-pm-noop.c | 1 + + 2 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c +index 89dd5f9..8e28546 100644 +--- a/arch/arm/plat-omap/clock.c ++++ b/arch/arm/plat-omap/clock.c +@@ -543,6 +543,7 @@ cnr_out: + + return r; + } ++EXPORT_SYMBOL(clk_notifier_register); + + /* + * clk_notifier_unregister - remove a clock change notifier +@@ -593,6 +594,7 @@ cnu_out: + + return r; + } ++EXPORT_SYMBOL(clk_notifier_unregister); + + #ifdef CONFIG_OMAP_RESET_CLOCKS + /* +diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c +index e129ce8..0f8275b 100644 +--- a/arch/arm/plat-omap/omap-pm-noop.c ++++ b/arch/arm/plat-omap/omap-pm-noop.c +@@ -88,6 +88,7 @@ int omap_pm_set_min_bus_tput(struct device *dev, u8 agent_id, unsigned long r) + + return 0; + } ++EXPORT_SYMBOL(omap_pm_set_min_bus_tput); + + int omap_pm_set_max_dev_wakeup_lat(struct device *req_dev, struct device *dev, + long t) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-RX-51-Set-pin-muxing-hooks-for-SDI-on-off.patch ^ |
@@ -0,0 +1,71 @@ +From 6c6bbd595458d20c9d6573a430d1b3eba826fc5e Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 18 Apr 2011 15:34:16 +0300 +Subject: [PATCH] RX-51: Set pin muxing hooks for SDI on/off + +The SDI block in OMAP3 leaks statically 1,6mA of current. +This can be blocked by putting the SDI pins into safe +mode when the SDI is disabled. + +Using the regulator VSDI_CSI switching for blocking the +leak cannot be done, as VSDI_CSI also powers the DSI pins +used for cellular modem enable, reset and other controls. +Hence the pinmuxing is used instead. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-video.c | 31 +++++++++++++++++++++++++++++++ + 1 files changed, 31 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c +index 612b058..0b98a80 100644 +--- a/arch/arm/mach-omap2/board-rx51-video.c ++++ b/arch/arm/mach-omap2/board-rx51-video.c +@@ -30,6 +30,36 @@ + + #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) + ++/* Enable input logic and pull all lines up when SDI display is on. */ ++static struct omap_board_mux rx51_sdi_on_mux[] = { ++ OMAP3_MUX(DSS_DATA10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ OMAP3_MUX(DSS_DATA11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ OMAP3_MUX(DSS_DATA12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ OMAP3_MUX(DSS_DATA13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ OMAP3_MUX(DSS_DATA22, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ OMAP3_MUX(DSS_DATA23, OMAP_PIN_OUTPUT | OMAP_MUX_MODE1), ++ { .reg_offset = OMAP_MUX_TERMINATOR }, ++}; ++ ++/* Disable input logic and pull all lines down when SDI display is off. */ ++static struct omap_board_mux rx51_sdi_off_mux[] = { ++ OMAP3_MUX(DSS_DATA10, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ OMAP3_MUX(DSS_DATA11, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ OMAP3_MUX(DSS_DATA12, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ OMAP3_MUX(DSS_DATA13, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ OMAP3_MUX(DSS_DATA22, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ OMAP3_MUX(DSS_DATA23, OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_MUX_MODE7), ++ { .reg_offset = OMAP_MUX_TERMINATOR }, ++}; ++ ++static void rx51_set_mux(int on) ++{ ++ if (on) ++ omap_mux_write_array(rx51_sdi_on_mux); ++ else ++ omap_mux_write_array(rx51_sdi_off_mux); ++} ++ + static int rx51_lcd_enable(struct omap_dss_device *dssdev) + { + gpio_set_value(dssdev->reset_gpio, 1); +@@ -79,6 +109,7 @@ static struct omap_dss_board_info rx51_dss_board_info = { + .num_devices = ARRAY_SIZE(rx51_dss_devices), + .devices = rx51_dss_devices, + .default_device = &rx51_lcd_device, ++ .set_mux = rx51_set_mux, + }; + + struct platform_device rx51_display_device = { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-RX-51-add-SGX-platform-device.patch ^ |
@@ -0,0 +1,34 @@ +From 8fa0bc8f0b58ff40d496e0db47c70682711e8980 Mon Sep 17 00:00:00 2001 +From: Carsten Valdemar Munk <carsten.munk@gmail.com> +Date: Wed, 15 Dec 2010 13:59:54 -0500 +Subject: [PATCH 39/42] RX-51: add SGX platform device + +In order to make newest SGX snapshot work on RX-51. + +Signed-off-by: Carsten Munk <carsten@maemo.org> +--- + arch/arm/mach-omap2/board-rx51-video.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c +index e3cea61..612b058 100644 +--- a/arch/arm/mach-omap2/board-rx51-video.c ++++ b/arch/arm/mach-omap2/board-rx51-video.c +@@ -89,8 +89,14 @@ struct platform_device rx51_display_device = { + }, + }; + ++static struct platform_device rx51_sgx_device = { ++ .name = "pvrsrvkm", ++ .id = -1, ++}; ++ + static struct platform_device *rx51_video_devices[] __initdata = { + &rx51_display_device, ++ &rx51_sgx_device, + }; + + static int __init rx51_video_init(void) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-RX-51-set-SGX-maximum-clock-rate-to-platform_data.patch ^ |
@@ -0,0 +1,46 @@ +From def9efd38b9696f959e52d30f5f56323c8e9ab78 Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Mon, 9 May 2011 14:11:23 +0300 +Subject: [PATCH] RX-51: set SGX maximum clock rate to platform_data + +The SGX will only run at 83MHz if proper maximum rate is +not provided by the board file. Set in the platform_data +the correct maximum rate, which is 110MHz (332MHz / 3). + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-video.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c +index 0b98a80..fb8811a 100644 +--- a/arch/arm/mach-omap2/board-rx51-video.c ++++ b/arch/arm/mach-omap2/board-rx51-video.c +@@ -14,6 +14,7 @@ + #include <linux/gpio.h> + #include <linux/spi/spi.h> + #include <linux/mm.h> ++#include <linux/pvr.h> + #include <asm/mach-types.h> + #include <plat/display.h> + #include <plat/vram.h> +@@ -120,9 +121,16 @@ struct platform_device rx51_display_device = { + }, + }; + ++static struct sgx_platform_data rx51_sgx_data = { ++ .fclock_max = 110666666, ++}; ++ + static struct platform_device rx51_sgx_device = { + .name = "pvrsrvkm", + .id = -1, ++ .dev = { ++ .platform_data = &rx51_sgx_data, ++ }, + }; + + static struct platform_device *rx51_video_devices[] __initdata = { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-Revert-et8ek8-Call-configure_interface-when-configur.patch ^ |
@@ -0,0 +1,126 @@ +From c5f732371e4ab003bb0e92609c577d933a7e147a Mon Sep 17 00:00:00 2001 +From: Teemu Tuominen <tux@t3.fi> +Date: Wed, 21 Sep 2011 09:58:16 +0300 +Subject: [PATCH] Revert "et8ek8: Call configure_interface when configuring the format" + +This reverts commit a66a458a568455357b561a1534ce8ea1a700965c. +--- + drivers/media/video/et8ek8.c | 58 +++++++++++++++++------------------------ + 1 files changed, 24 insertions(+), 34 deletions(-) + +diff --git a/drivers/media/video/et8ek8.c b/drivers/media/video/et8ek8.c +index 9448bcc..1a55895 100644 +--- a/drivers/media/video/et8ek8.c ++++ b/drivers/media/video/et8ek8.c +@@ -517,6 +517,11 @@ static int et8ek8_configure(struct et8ek8_sensor *sensor) + if (rval) + goto fail; + ++ rval = sensor->platform_data->configure_interface( ++ subdev, &sensor->current_reglist->mode); ++ if (rval) ++ goto fail; ++ + /* Controls set while the power to the sensor is turned off are saved + * but not applied to the hardware. Now that we're about to start + * streaming apply all the current values to the hardware. +@@ -532,33 +537,14 @@ fail: + return rval; + } + +-static int et8ek8_stream_on(struct et8ek8_sensor *sensor) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); +- +- return smia_i2c_write_reg(client, SMIA_REG_8BIT, 0x1252, 0xb0); +-} +- +-static int et8ek8_stream_off(struct et8ek8_sensor *sensor) +-{ +- struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); +- +- return smia_i2c_write_reg(client, SMIA_REG_8BIT, 0x1252, 0x30); +-} +- + static int et8ek8_s_stream(struct v4l2_subdev *subdev, int streaming) + { +- struct et8ek8_sensor *sensor = to_et8ek8_sensor(subdev); +- int ret; +- +- if (!streaming) +- return et8ek8_stream_off(sensor); +- +- ret = et8ek8_configure(sensor); +- if (ret < 0) +- return ret; ++ struct i2c_client *client = v4l2_get_subdevdata(subdev); + +- return et8ek8_stream_on(sensor); ++ if (streaming) ++ return smia_i2c_write_reg(client, SMIA_REG_8BIT, 0x1252, 0xB0); ++ else ++ return smia_i2c_write_reg(client, SMIA_REG_8BIT, 0x1252, 0x30); + } + + /* -------------------------------------------------------------------------- +@@ -703,8 +689,7 @@ static int et8ek8_set_pad_format(struct v4l2_subdev *subdev, + struct et8ek8_sensor *sensor = to_et8ek8_sensor(subdev); + struct v4l2_mbus_framefmt *format; + struct smia_reglist *reglist; +- int ret; +- ++ + format = __et8ek8_get_pad_format(sensor, fh, fmt->pad, fmt->which); + if (format == NULL) + return -EINVAL; +@@ -716,11 +701,6 @@ static int et8ek8_set_pad_format(struct v4l2_subdev *subdev, + + if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { + sensor->current_reglist = reglist; +- ret = sensor->platform_data->configure_interface(subdev, +- &sensor->current_reglist->mode); +- if (ret < 0) +- return ret; +- + et8ek8_update_controls(sensor); + } + +@@ -913,14 +893,14 @@ static int et8ek8_dev_init(struct v4l2_subdev *subdev) + name); + goto out_release; + } +- rval = et8ek8_stream_on(sensor); /* Needed to be able to read EEPROM */ ++ rval = et8ek8_s_stream(subdev, 1); /* Needed to be able to read EEPROM */ + if (rval) + goto out_release; + rval = et8ek8_g_priv_mem(subdev); + if (rval) + dev_warn(&client->dev, + "can not read OTP (EEPROM) memory from sensor\n"); +- rval = et8ek8_stream_off(sensor); ++ rval = et8ek8_s_stream(subdev, 0); + if (rval) + goto out_release; + +@@ -997,7 +977,17 @@ et8ek8_registered(struct v4l2_subdev *subdev) + + static int __et8ek8_set_power(struct et8ek8_sensor *sensor, int on) + { +- return on ? et8ek8_power_on(sensor) : et8ek8_power_off(sensor); ++ int ret; ++ ++ ret = on ? et8ek8_power_on(sensor) : et8ek8_power_off(sensor); ++ if (ret < 0) ++ return ret; ++ ++ if (!on) ++ return 0; ++ ++ /* Restore the sensor settings */ ++ return et8ek8_configure(sensor); + } + + static int et8ek8_set_power(struct v4l2_subdev *subdev, int on) +-- +1.7.3.4 + | ||
[-] [+] | Added | linux-2.6-SGX-PVR-patchset.patch ^ |
@@ -0,0 +1,46406 @@ +From 305cbf569e7fe1ae86f5f273ff1efc9c9cbf996c Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Thu, 27 Jan 2011 14:50:37 +0200 +Subject: [PATCH 38/42] SGX/PVR patchset + +Consists of the following patches: + +b141e66f60fbc8861bb41d766ce9fe454fa50865 gpu: pvr: add slab.h include in order to make driver build on 2.6.35.3 +96bcc8a7cac941fef92be10af3abac2d70a687c2 gpu: pvr: Snapshot pending write ops during event request +4f0be7fe38b5aafd94899887a4326e30aadf5bca gpu: pvr: Expose new display events to user space +fa31ec4677b3a414a64e94e42c999add78da873e gpu: pvr: wire in the dynamic power-down delay calculation +8a4f5a1afa744c6cf69bf17507414622ae2e6d2e gpu: pvr: add support for dynamic timing of SGX HW power down +512a8f0c397ad25b761537e1d1be03f4fdfd1756 gpu: pvr: fix SysGetSGXTimingInformation for cases when the HW is off +8bb5ad5f77c7fed1fdc970ceab93d43e382999a4 gpu: pvr: split out setting power down delay into its own function +fbc998b0eb33d886090b0d270b1530fd264046f6 gpu: pvr: fix typo in SGXDoKickBW +9757baf313dae8b231c48be48ec8df6e542661e3 gpu: pvr: remove unnecessary udelay from the HW poll loop +fdd48827a64c50ce0273594a0d01a4e5e60e3229 gpu: pvr: fix locking on the HW recovery reset error path +9fcd0bd0579ececbe0099f4423320e306ac2c820 gpu: pvr: Fixed error path in cache flush function. +7c6d5ee833f6584832ab6f8c3ea9309fe1cba9bf gpu: pvr: Increase the max number of 3D TA status vals in kick requests +dbba26ce49f5ece83bb5f5dcb0d4cdf6ad8b3fe7 gpu: pvr: pass IOCTL in param size to dispatch func +94f7110338c09ced606c6c57f1a7072ba0deb9fe gpu: pvr: Check SysAcquireData return value. +b54c9297e563a23ec87ac3596d6068a49441f729 gpu: pvr: Remove SysAcquireData call in pvr_cleanup. +524920031f45ff9eba6bf5d6fa0106acd890c52f gpu: pvr: Check OSAllocMem return value. +3bc587496272480f6632bb4fdbff9e5a956a7b40 gpu: pvr: Check OSAllocMem return value. +b1ce06c7cef469d8ab9eadad79d7afaaa3002be1 gpu: pvr: Check OSAllocMem return value. +98757a3360ea635d93ea2e774adaa514ac34be73 gpu: pvr: Removed needless NULL check in MMU_BIFResetPDAlloc. +1e0bde986ac07cd43b38c12ca1ad90631074c652 gpu: pvr: Remove FIRST_PHYSICAL_PFN define. +95877512d54ebdb5c62f1dc63ff7a3fcd2552fdf gpu: pvr: Check OSAllocMem return value. +0c8018a33075631878e5fc30ba2fc1e1138e342c gpu: pvr: Check OSAllocMem return value. +5ab25e67723c94a165e6bdcac02baebece8fa2fe gpu: pvr: Changed ReallocMem. +e043f785b9e2ee0ee1eb410931f41703bfadc038 gpu: pvr: Changed error-path condtion. +89cd6b9c19189efe9966c8e1b2029bcfab4e208d gpu: pvr: Remove needless NULL check in PVRSRVWrapExtMemoryKM. +7ff080b874628252b2588f996fab9a83c9c3f163 gpu: pvr: Remove needless NULL check in BM_CreateHeap. +77f1ae6e319b47bc45f38d57c0a9ddf07d77928b gpu: pvr: Remove needless NULL check in WrapMemory. +9adfa5e7f0c773d83f6b0bb76940bfa1e96e5933 gpu: pvr: Fixed formatting in buffer_manager.c +6c37ec901f10d13754635016bc21e49ef0c933ca gpu: pvr: Remove needless NULL check in BM_DestroyHeap. +bd5005db2273533c92f64054ea45f842b27b4177 gpu: pvr: Remove needless NULL check in BM_ImportMemory. +df15b9137244088598daab3297900e84e89cef94 gpu: pvr: fix locking around HWRecoveryResetSGX +a0098a4da5a18ca0b61d4ead729f9211f4dc9fb2 gpu: pvr: rename pvr_dvfs_lock to pvr_dev_lock +e07a50e731492cbc653ab07a656fa655cb6c6b5b gpu: pvr: add dvfs lock +d4076bf8eb7dbeec3a358a5e6ca68ee4c61f195f gpu: pvr: add SGXScheduleProcessQueues to prepare for pvr_dev_lock +6e85d36fc5e6840dae7792f902939bfa0345d339 gpu: pvr: omaplfb: remove unnecessary fb unblanking +07f4ce65832951e1d047a0f3cf3012e46fce5432 gpu: pvr: Use DSS notifier to signal flip complete events +83d620c7c7b6f1e758d0eb587d03f5f29157e1bc gpu: pvr: Reduce code duplication +5feea45528a277d47465da851ed9436ee0ab0960 gpu: pvr: Add support for flip complete events +8802e648054175d54eba2efb99c4491677994816 gpu: pvr: fix handle allocation when sharing sync objects +bebf7bbb24a6b9101c14334c6326e1863e8a07a8 gpu: pvr: Reuse the same syncobject across all wraps +ff0e0fef5cb2dffbefb768772acee0b7bd7dafa9 gpu: pvr: Disable driver if SGX HW recovery fails +641919157f00240db9a7376c3d789e05fbbbd09d gpu: pvr: optimize pvr_lock() by inlining it +049ffd189fb3c1f370cefde29ebc70cf5bcbcea4 gpu: pvr: move ocp_cleanup() later during device deinit +981d6ebbde86c47263264563b011efd0bfee9d8a gpu: pvr: fix lockdep problem +1fc2706a86edf7154e0d09f4fd3f8500f74869ac gpu: pvr: more accurate error reporting when clk_set_rate fails +d99320918717c328513df18d33d0b3508f35dde2 gpu: pvr: support for user data in events +89f2bbb8d4025560ed5b7d18b66e5fa0195d5256 gpu: pvr: enable render complete events +24e1bd1b59761314f37ebc2d5e1c26eb2055944e gpu: pvr: support for render complete events +893c2abb3a2012ce89b0208dc74d52630b66f458 gpu: pvr: support for polling events +75d76b8dcb65b2d46c229d3042dcb1999bd7f265 gpu: pvr: support for events +a5031c27a78d462582999f7c3f04ad57bbf449dd gpu: pvr: replace boolean by flags in blits complete query +85f065dee15a058663c936eeaaf41ae4802e7096 gpu: pvr: round the SGX fclock rate to the nearest supported +fee44981089f7232f6b2329721b31788a64c4626 gpu: pvr: remove support for broken LINUX_MEM_AREAS_DEBUG +54a2b22fc67249c312163f00879ab680564fb649 gpu: pvr: fix PDUMP configuartion in release build +ffb017bb299202ff82b06075f2efb617a7385686 gpu: pvr: remove unrelevant comments about caller ID +3c91d71f91ca092c3ddedfb6b915bad99b45e1ff gpu: pvr: remove unused function args from SGXTestActivePowerEvent +1ef6e9c07c661131e34f577b076e22a168a1d6d8 gpu: pvr: remove unused function args from SGXPostActivePowerEvent +abc56ae295a1c3dcf9388e5ae6926eaed81402e5 gpu: pvr: no need to delay queue processing in SGXPostActivePowerEvent +589b9482e9d6c7f1f942834629d34d35c5c3576c gpu: pvr: no need to check for retry failures in SGXTestActivePowerEvent +9e3e26f72b749148aa9611cb62460bb4ff66ce06 gpu: pvr: no need to check for IRQ context in SGXCommandComplete +61e827154441b04684b8542b14d47ccd62df8347 gpu: pvr: no need to check for retry failures in SGXScheduleCCBCommandKM +cf8de1d5f12fdfe7aa2fb1252650d712e5991914 gpu: pvr: remove unused function args from HWRecoveryResetSGX +45813e47e7d1cb49123343a04a25c3cd18f17f8c gpu: pvr: no need to check for retry failures in PVRSRVMISR +f056ac2014664537be61ea3b6c9e968f0e967fcd gpu: pvr: remove unused function args from PVRSRVProcessQueues +6d276b10e23e7239771a109b772220464347d998 gpu: pvr: remove unused function args from PVRSRVSetDevicePowerStateKM +79162acbd011dd6c1162d7ce1e5dcd31187db3c8 gpu: pvr: remove sQProcessResource/OSLockResource interface +b47b540525a0ce326c4e2926e7c3148d80f6e95b gpu: pvr: remove sPowerStateChangeResource lock +418260533b659e31f6d9b477642d8a18faa34558 gpu: pvr: remove PVRSRVPowerLock() +02bf51ed6a434ce237bee07041a7fb2fcd88b950 gpu: pvr: fix locking on the DVFS path +2d7a74a6ba87b70e37f9d54634600226587d0e72 gpu: pvr: fix locking on SGX load calculating thread +d36aa0a7c5f29187da7a6e3a4ffff7bac85c260f gpu: pvr: enable debug trace for basic debug build +7b82e9ea1b1901507db38b037d738ad48b8dcebf gpu: pvr: add option for extra debugging information +89e10ea5fbe10f1199fc4f624d7bacae754cba1e gpu: pvr: dump process info at HW recovery reset +5b8f8a4c991c8aa0782c28de2aac529f8d5d7333 gpu: pvr: add helpers to look up resource context and proc info +9abf4416b38cda471aab262fd8b136d51555d3ae gpu: pvr: clean up FreeResourceByCriteria +fc4e8af5d257c6cbefe4c888cd59addc8f44ad38 gpu: pvr: add support for finding the BM context from the DL +f6b257d84c31909b8a873cbb3fd730e54ef2609f gpu: pvr: make sure the device is powered on in SGX_MISRHandler +e4e2c11673991fb7c6a82c99b4934828e415c193 gpu: pvr: remove unused per device variable +ed107fec59c3df191d0aa4c144bd628204192b49 gpu: pvr: fix indent error +b7c9c85ccd977b1d577033cc6cc661b30d9803e8 gpu: pvr: BUG if pvr_lock is not held in HWRecoveryResetSGX +d7a9d00a4de121eb038daef4b92687fcd597fc89 gpu: pvr: fix locking in pvr_dbg_reset +b75a43e27b54c8a3431849a9019d8f4215340cb4 gpu: pvr: acquire the pvr lock on the SGX HW recovery path +7711e9d564f44aa48f6b4aa1d008925a0c3fb063 gpu: pvr: fix locking on the HW interrupt path +f3825cb25bad713f199c9e0a9a421144522ac682 gpu: pvr: bail out from SGXOSTimer if it's been canceled +7e7784a24e45bdb2e9d88294794826a957df168b gpu: pvr: add pvr_lock/remove unneeded lock headers +aa62bdb020826442b7f7056288af392ad3e96c86 gpu: pvr: add support to set board specific max SGX functional clk rate +4c7ef9562ccfbfa2573f6482974aedb5a0492021 gpu: pvr: move device registration into board file +25636381c42babb0f6405596c7a0a57d163275ce gpu: pvr: compilation fixes for kernel > 2.6.33 +956e40b75c405d5d577e8eb0ae901e8af4063d25 gpu: pvr: Add PVR GPU driver +--- + drivers/gpu/Makefile | 2 +- + drivers/gpu/pvr/COPYING | 351 +++ + drivers/gpu/pvr/Kconfig | 55 + + drivers/gpu/pvr/Makefile | 44 + + drivers/gpu/pvr/README | 27 + + drivers/gpu/pvr/bridged_pvr_bridge.c | 3341 +++++++++++++++++++++++++ + drivers/gpu/pvr/bridged_pvr_bridge.h | 158 ++ + drivers/gpu/pvr/bridged_sgx_bridge.c | 1871 ++++++++++++++ + drivers/gpu/pvr/bridged_sgx_bridge.h | 167 ++ + drivers/gpu/pvr/bridged_support.c | 77 + + drivers/gpu/pvr/bridged_support.h | 35 + + drivers/gpu/pvr/buffer_manager.c | 1493 +++++++++++ + drivers/gpu/pvr/buffer_manager.h | 171 ++ + drivers/gpu/pvr/bufferclass_example.c | 266 ++ + drivers/gpu/pvr/bufferclass_example.h | 104 + + drivers/gpu/pvr/bufferclass_example_linux.c | 202 ++ + drivers/gpu/pvr/bufferclass_example_linux.h | 46 + + drivers/gpu/pvr/bufferclass_example_private.c | 194 ++ + drivers/gpu/pvr/bufferclass_example_private.h | 33 + + drivers/gpu/pvr/dbgdrvif.h | 318 +++ + drivers/gpu/pvr/device.h | 187 ++ + drivers/gpu/pvr/deviceclass.c | 1522 +++++++++++ + drivers/gpu/pvr/devicemem.c | 1208 +++++++++ + drivers/gpu/pvr/env_data.h | 57 + + drivers/gpu/pvr/env_perproc.h | 51 + + drivers/gpu/pvr/event.c | 274 ++ + drivers/gpu/pvr/event.h | 35 + + drivers/gpu/pvr/handle.c | 1442 +++++++++++ + drivers/gpu/pvr/handle.h | 150 ++ + drivers/gpu/pvr/hash.c | 379 +++ + drivers/gpu/pvr/hash.h | 51 + + drivers/gpu/pvr/img_defs.h | 46 + + drivers/gpu/pvr/img_types.h | 69 + + drivers/gpu/pvr/ioctldef.h | 93 + + drivers/gpu/pvr/kernelbuffer.h | 55 + + drivers/gpu/pvr/kerneldisplay.h | 104 + + drivers/gpu/pvr/mem.c | 130 + + drivers/gpu/pvr/mm.c | 1499 +++++++++++ + drivers/gpu/pvr/mm.h | 261 ++ + drivers/gpu/pvr/mmap.c | 920 +++++++ + drivers/gpu/pvr/mmap.h | 74 + + drivers/gpu/pvr/mmu.c | 1439 +++++++++++ + drivers/gpu/pvr/mmu.h | 86 + + drivers/gpu/pvr/module.c | 294 +++ + drivers/gpu/pvr/mutils.h | 37 + + drivers/gpu/pvr/ocpdefs.h | 294 +++ + drivers/gpu/pvr/oemfuncs.h | 41 + + drivers/gpu/pvr/omaplfb.h | 140 + + drivers/gpu/pvr/omaplfb_displayclass.c | 820 ++++++ + drivers/gpu/pvr/omaplfb_linux.c | 168 ++ + drivers/gpu/pvr/osfunc.c | 1498 +++++++++++ + drivers/gpu/pvr/osfunc.h | 216 ++ + drivers/gpu/pvr/osperproc.c | 84 + + drivers/gpu/pvr/osperproc.h | 36 + + drivers/gpu/pvr/pb.c | 419 ++++ + drivers/gpu/pvr/pdump.c | 1271 ++++++++++ + drivers/gpu/pvr/pdump_common.c | 237 ++ + drivers/gpu/pvr/pdump_km.h | 268 ++ + drivers/gpu/pvr/pdumpdefs.h | 92 + + drivers/gpu/pvr/perproc.c | 266 ++ + drivers/gpu/pvr/perproc.h | 79 + + drivers/gpu/pvr/power.c | 559 +++++ + drivers/gpu/pvr/power.h | 97 + + drivers/gpu/pvr/private_data.h | 42 + + drivers/gpu/pvr/proc.c | 421 ++++ + drivers/gpu/pvr/proc.h | 54 + + drivers/gpu/pvr/pvr_bridge.h | 1107 ++++++++ + drivers/gpu/pvr/pvr_bridge_k.c | 241 ++ + drivers/gpu/pvr/pvr_bridge_km.h | 222 ++ + drivers/gpu/pvr/pvr_debug.c | 358 +++ + drivers/gpu/pvr/pvr_debug.h | 110 + + drivers/gpu/pvr/pvr_events.c | 303 +++ + drivers/gpu/pvr/pvr_events.h | 99 + + drivers/gpu/pvr/pvrconfig.h | 35 + + drivers/gpu/pvr/pvrmmap.h | 36 + + drivers/gpu/pvr/pvrmodule.h | 31 + + drivers/gpu/pvr/pvrsrv.c | 921 +++++++ + drivers/gpu/pvr/pvrversion.h | 37 + + drivers/gpu/pvr/queue.c | 761 ++++++ + drivers/gpu/pvr/queue.h | 81 + + drivers/gpu/pvr/ra.c | 1164 +++++++++ + drivers/gpu/pvr/ra.h | 107 + + drivers/gpu/pvr/resman.c | 568 +++++ + drivers/gpu/pvr/resman.h | 95 + + drivers/gpu/pvr/services.h | 237 ++ + drivers/gpu/pvr/services_headers.h | 42 + + drivers/gpu/pvr/servicesext.h | 435 ++++ + drivers/gpu/pvr/servicesint.h | 181 ++ + drivers/gpu/pvr/sgx530defs.h | 471 ++++ + drivers/gpu/pvr/sgx_bridge.h | 397 +++ + drivers/gpu/pvr/sgx_bridge_km.h | 109 + + drivers/gpu/pvr/sgx_options.h | 178 ++ + drivers/gpu/pvr/sgxapi_km.h | 238 ++ + drivers/gpu/pvr/sgxconfig.h | 75 + + drivers/gpu/pvr/sgxcoretypes.h | 41 + + drivers/gpu/pvr/sgxdefs.h | 38 + + drivers/gpu/pvr/sgxerrata.h | 34 + + drivers/gpu/pvr/sgxfeaturedefs.h | 40 + + drivers/gpu/pvr/sgxinfo.h | 342 +++ + drivers/gpu/pvr/sgxinfokm.h | 270 ++ + drivers/gpu/pvr/sgxinit.c | 1663 ++++++++++++ + drivers/gpu/pvr/sgxkick.c | 521 ++++ | ||
[-] [+] | Added | linux-2.6-SoC-RX-51-Add-route-for-AIC34B-generated-mic-bias.patch ^ |
@@ -0,0 +1,33 @@ +From 4d9cc9ff3d499bbfcaa119b50cafdc56946f2b15 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 29 Jun 2010 17:38:49 +0300 +Subject: [PATCH 22/42] SoC: RX-51: Add route for AIC34B generated mic bias + +This patch adds support for headset mic bias by using a feature provided +by the aic34b_dummy driver. + +As the aic34b_dummy should vanish after the ASoC multi-component is ready, +also this patch must be edited by modifying the audio_map accordingly. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/rx51.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index bbaaea9..8f13092 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -315,7 +315,8 @@ static const struct snd_soc_dapm_route audio_map[] = { + {"Earpiece", NULL, "34B_HPLOUT"}, + {"Earpiece", NULL, "34B_HPLCOM"}, + +- {"LINE1L", NULL, "Mic Jack"}, ++ {"LINE1L", NULL, "34B Mic Bias 2.5V"}, ++ {"34B Mic Bias 2.5V", NULL, "Mic Jack"} + }; + + static const char *spk_function[] = {"Off", "On"}; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-V4L-DVB-radio-si4713-Add-regulator-framework-support.patch ^ |
@@ -0,0 +1,232 @@ +From 6f6b90e611c72ccf383bfcfafc2d707fad3a1102 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Sun, 13 Jun 2010 18:01:46 +0300 +Subject: [PATCH 15/42] V4L/DVB: radio-si4713: Add regulator framework support + +Convert the driver to use regulator framework instead of set_power callback. +This with gpio_reset platform data provide cleaner way to manage chip VIO, +VDD and reset signal inside the driver. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Cc: Eduardo Valentin <eduardo.valentin@nokia.com> +--- + drivers/media/radio/radio-si4713.c | 20 ++++++++++++++- + drivers/media/radio/si4713-i2c.c | 48 ++++++++++++++++++++++++++++------- + drivers/media/radio/si4713-i2c.h | 3 +- + include/media/si4713.h | 3 +- + 4 files changed, 60 insertions(+), 14 deletions(-) + +diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c +index 726d367..740e399 100644 +--- a/drivers/media/radio/radio-si4713.c ++++ b/drivers/media/radio/radio-si4713.c +@@ -28,6 +28,7 @@ + #include <linux/i2c.h> + #include <linux/videodev2.h> + #include <linux/slab.h> ++#include <linux/regulator/consumer.h> + #include <media/v4l2-device.h> + #include <media/v4l2-common.h> + #include <media/v4l2-ioctl.h> +@@ -48,6 +49,7 @@ MODULE_VERSION("0.0.1"); + struct radio_si4713_device { + struct v4l2_device v4l2_dev; + struct video_device *radio_dev; ++ struct regulator *reg_vio; + }; + + /* radio_si4713_fops - file operations interface */ +@@ -284,12 +286,22 @@ static int radio_si4713_pdriver_probe(struct platform_device *pdev) + goto free_rsdev; + } + ++ rsdev->reg_vio = regulator_get(&pdev->dev, "vio"); ++ if (IS_ERR(rsdev->reg_vio)) { ++ dev_err(&pdev->dev, "Cannot get vio regulator\n"); ++ rval = PTR_ERR(rsdev->reg_vio); ++ goto unregister_v4l2_dev; ++ } ++ rval = regulator_enable(rsdev->reg_vio); ++ if (rval) ++ goto reg_put; ++ + adapter = i2c_get_adapter(pdata->i2c_bus); + if (!adapter) { + dev_err(&pdev->dev, "Cannot get i2c adapter %d\n", + pdata->i2c_bus); + rval = -ENODEV; +- goto unregister_v4l2_dev; ++ goto reg_disable; + } + + sd = v4l2_i2c_new_subdev_board(&rsdev->v4l2_dev, adapter, +@@ -323,6 +335,10 @@ free_vdev: + video_device_release(rsdev->radio_dev); + put_adapter: + i2c_put_adapter(adapter); ++reg_disable: ++ regulator_disable(rsdev->reg_vio); ++reg_put: ++ regulator_put(rsdev->reg_vio); + unregister_v4l2_dev: + v4l2_device_unregister(&rsdev->v4l2_dev); + free_rsdev: +@@ -344,6 +360,8 @@ static int __exit radio_si4713_pdriver_remove(struct platform_device *pdev) + + video_unregister_device(rsdev->radio_dev); + i2c_put_adapter(client->adapter); ++ regulator_disable(rsdev->reg_vio); ++ regulator_put(rsdev->reg_vio); + v4l2_device_unregister(&rsdev->v4l2_dev); + kfree(rsdev); + +diff --git a/drivers/media/radio/si4713-i2c.c b/drivers/media/radio/si4713-i2c.c +index a6e6f19..c7f350e 100644 +--- a/drivers/media/radio/si4713-i2c.c ++++ b/drivers/media/radio/si4713-i2c.c +@@ -27,6 +27,8 @@ + #include <linux/interrupt.h> + #include <linux/i2c.h> + #include <linux/slab.h> ++#include <linux/gpio.h> ++#include <linux/regulator/consumer.h> + #include <media/v4l2-device.h> + #include <media/v4l2-ioctl.h> + #include <media/v4l2-common.h> +@@ -369,7 +371,12 @@ static int si4713_powerup(struct si4713_device *sdev) + if (sdev->power_state) + return 0; + +- sdev->platform_data->set_power(1); ++ regulator_enable(sdev->reg_vdd); ++ if (gpio_is_valid(sdev->gpio_reset)) { ++ udelay(50); ++ gpio_set_value(sdev->gpio_reset, 1); ++ } ++ + err = si4713_send_command(sdev, SI4713_CMD_POWER_UP, + args, ARRAY_SIZE(args), + resp, ARRAY_SIZE(resp), +@@ -384,7 +391,9 @@ static int si4713_powerup(struct si4713_device *sdev) + err = si4713_write_property(sdev, SI4713_GPO_IEN, + SI4713_STC_INT | SI4713_CTS); + } else { +- sdev->platform_data->set_power(0); ++ if (gpio_is_valid(sdev->gpio_reset)) ++ gpio_set_value(sdev->gpio_reset, 0); ++ regulator_disable(sdev->reg_vdd); + } + + return err; +@@ -411,7 +420,9 @@ static int si4713_powerdown(struct si4713_device *sdev) + v4l2_dbg(1, debug, &sdev->sd, "Power down response: 0x%02x\n", + resp[0]); + v4l2_dbg(1, debug, &sdev->sd, "Device in reset mode\n"); +- sdev->platform_data->set_power(0); ++ if (gpio_is_valid(sdev->gpio_reset)) ++ gpio_set_value(sdev->gpio_reset, 0); ++ regulator_disable(sdev->reg_vdd); + sdev->power_state = POWER_OFF; + } + +@@ -1967,6 +1978,7 @@ static int si4713_probe(struct i2c_client *client, + const struct i2c_device_id *id) + { + struct si4713_device *sdev; ++ struct si4713_platform_data *pdata = client->dev.platform_data; + int rval; + + sdev = kzalloc(sizeof *sdev, GFP_KERNEL); +@@ -1976,11 +1988,20 @@ static int si4713_probe(struct i2c_client *client, + goto exit; + } + +- sdev->platform_data = client->dev.platform_data; +- if (!sdev->platform_data) { +- v4l2_err(&sdev->sd, "No platform data registered.\n"); +- rval = -ENODEV; +- goto free_sdev; ++ sdev->gpio_reset = -1; ++ if (pdata && gpio_is_valid(pdata->gpio_reset)) { ++ rval = gpio_request(pdata->gpio_reset, "si4713 reset"); ++ if (rval) ++ goto free_sdev; ++ sdev->gpio_reset = pdata->gpio_reset; ++ gpio_direction_output(sdev->gpio_reset, 0); ++ } ++ ++ sdev->reg_vdd = regulator_get(&client->dev, "vdd"); ++ if (IS_ERR(sdev->reg_vdd)) { ++ dev_err(&client->dev, "Cannot get vdd regulator\n"); ++ rval = PTR_ERR(sdev->reg_vdd); ++ goto free_gpio; + } + + v4l2_i2c_subdev_init(&sdev->sd, client, &si4713_subdev_ops); +@@ -1994,7 +2015,7 @@ static int si4713_probe(struct i2c_client *client, + client->name, sdev); + if (rval < 0) { + v4l2_err(&sdev->sd, "Could not request IRQ\n"); +- goto free_sdev; ++ goto put_reg; + } + v4l2_dbg(1, debug, &sdev->sd, "IRQ requested.\n"); + } else { +@@ -2012,6 +2033,11 @@ static int si4713_probe(struct i2c_client *client, + free_irq: + if (client->irq) + free_irq(client->irq, sdev); ++put_reg: ++ regulator_put(sdev->reg_vdd); ++free_gpio: ++ if (gpio_is_valid(sdev->gpio_reset)) ++ gpio_free(sdev->gpio_reset); + free_sdev: + kfree(sdev); + exit: +@@ -2031,7 +2057,9 @@ static int si4713_remove(struct i2c_client *client) + free_irq(client->irq, sdev); + + v4l2_device_unregister_subdev(sd); +- ++ regulator_put(sdev->reg_vdd); ++ if (gpio_is_valid(sdev->gpio_reset)) ++ gpio_free(sdev->gpio_reset); + kfree(sdev); + + return 0; +diff --git a/drivers/media/radio/si4713-i2c.h b/drivers/media/radio/si4713-i2c.h +index faf8cff..cf79f6e 100644 | ||
[-] [+] | Added | linux-2.6-cpufreq-0010-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch ^ |
@@ -0,0 +1,27 @@ +From 645265683a495f820b230de48e059eb790a9395e 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 10/32] 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> +--- + 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 11c54ec..79d2155 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.0.4 + | ||
[-] [+] | Added | linux-2.6-cpufreq-0011-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch ^ |
@@ -0,0 +1,31 @@ +From 908f8c17ae84a43bde87187c620be0d37d37a908 Mon Sep 17 00:00:00 2001 +From: Kevin Hilman <khilman@deeprootsystems.com> +Date: Wed, 11 Aug 2010 17:05:38 -0700 +Subject: [PATCH 11/32] 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> +--- + 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 79d2155..bfa063b 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -126,6 +126,10 @@ static int __init 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.0.4 + | ||
[-] [+] | Added | linux-2.6-cpufreq-0012-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch ^ |
@@ -0,0 +1,263 @@ +From e9ed9761c0093634cba1bb945333b4f6247fc0e4 Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak <rnayak@ti.com> +Date: Mon, 10 Nov 2008 17:00:25 +0530 +Subject: [PATCH 12/32] 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> +--- + 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 a535c7a..c9ae53f 100644 +--- a/arch/arm/mach-omap2/clock.h ++++ b/arch/arm/mach-omap2/clock.h +@@ -138,7 +138,9 @@ extern const struct clksel_rate gpt_32k_rates[]; + extern const struct clksel_rate gpt_sys_rates[]; + extern const struct clksel_rate gfx_l3_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 +@@ -146,6 +148,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_omap3_noncore_dpll_ops; + + #endif +diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c +index 6febd5f..48a06f2 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 bfa063b..7753e86 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" | ||
[-] [+] | Added | linux-2.6-cpufreq-0013-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch ^ |
@@ -0,0 +1,32 @@ +From 2d0e8cf68965266e198ae039c4d831a401df658b 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 13/32] 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> +--- + 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 7753e86..c47faf8 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.0.4 + | ||
[-] [+] | Added | linux-2.6-cpufreq-0014-cpufreq-fixup-after-new-OPP-layer-merged.patch ^ |
@@ -0,0 +1,33 @@ +From 6b2a2572374e8b2be72539d903c794d1f1e19bf9 Mon Sep 17 00:00:00 2001 +From: Kevin Hilman <khilman@deeprootsystems.com> +Date: Tue, 16 Nov 2010 11:48:41 -0800 +Subject: [PATCH 14/32] cpufreq: fixup after new OPP layer merged + +--- + 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 c47faf8..1c1b80b 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.0.4 + | ||
[-] [+] | Added | linux-2.6-drivers-media-video-smiaregs.c-downgrade-KERN_ALERT-.patch ^ |
@@ -0,0 +1,30 @@ +From 02f1986b054f4c87d798de7de06c603b878ed079 Mon Sep 17 00:00:00 2001 +From: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> +Date: Mon, 9 May 2011 14:54:32 +0300 +Subject: [PATCH] drivers/media/video/smiaregs.c: downgrade KERN_ALERT to KERN_INFO + +In drivers/media/video/smiaregs.c there is informative printk +with level KERN_ALERT. Downgrade this to KERN_INFO to prevent +unnecessary debug information overwriting bootsplash. + +Signed-off-by: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> +--- + drivers/media/video/smiaregs.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/media/video/smiaregs.c b/drivers/media/video/smiaregs.c +index 592d18a..fcb6759 100644 +--- a/drivers/media/video/smiaregs.c ++++ b/drivers/media/video/smiaregs.c +@@ -229,7 +229,7 @@ int smia_reglist_import(struct smia_meta_reglist *meta) + return -EILSEQ; + } + +- printk(KERN_ALERT "%s: meta_reglist version %s\n", ++ printk(KERN_INFO "%s: meta_reglist version %s\n", + __func__, meta->version); + + while (meta->reglist[nlists].offset != 0) { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0017-OMAP-Introduce-accessory-APIs-for-DVFS.patch ^ |
@@ -0,0 +1,587 @@ +From 80ab3b8eeb377d4705e054b98b3de5e39b0b5d74 Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:30:53 +0530 +Subject: [PATCH 17/32] OMAP: Introduce accessory APIs for DVFS + +This patch introduces accessory APIs for DVFS. +Data structures added: +1. omap_dev_user_list: This structure maintains list of frequency requests per + device basis. When a device needs to be scaled to a particular frequency, + This list is searched to find the maximum request for a given device. + If noone has placed any request, device frequency is obtained from device + opp table. +2. omap_vdd_dev_list: This strcucture stores device list per vdd basis. + Whenever a device is registered with a vdd, it is added to this list. +3. omap_vdd_user_list: User list of devices associated with each voltage domain + instance. The user list is implemented using plist structure with priority + node populated with the voltage values. +4. omap_vdd_dvfs_info: This structure is used to abstract DVFS related + information per VDD basis. It holds pointer to corresponding vdd's + voltagedomain instance and pointer to user list. + +Following APIs have been added to operate on above data structures: +1. omap_dvfs_add_vdd_user - API to add a user into omap_vdd_user_list +2. omap_vdd_user_list - API to remove a user from omap_vdd_user_list +3. omap_dvfs_register_device - API to register a device with vdd +4. omap_dvfs_add_freq_request - API to add a frequency request into + omap_dev_user_list +5. omap_dvfs_remove_freq_request - API to remove a frequency request from + omap_dev_user_list +6. omap_dvfs_find_voltage - API to find the opp corresponding to given voltage + +DVFS layer is initialized and basic data structures are allocated and +initialized as part of this. + +This patch is based on Thara's previous DVFS implementation, but with major +rework. + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +Cc: Thara Gopinath <thara@ti.com> +[jhnikula@gmail.com: Makefile change applied manually] +--- + arch/arm/mach-omap2/Makefile | 2 +- + arch/arm/mach-omap2/dvfs.c | 456 ++++++++++++++++++++++++++++++++ + arch/arm/plat-omap/include/plat/dvfs.h | 27 ++ + arch/arm/plat-omap/omap_device.c | 9 + + 4 files changed, 493 insertions(+), 1 deletions(-) + create mode 100644 arch/arm/mach-omap2/dvfs.c + create mode 100644 arch/arm/plat-omap/include/plat/dvfs.h + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 5eb879e..0711f97 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -60,7 +60,7 @@ ifeq ($(CONFIG_PM),y) + obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o + obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o voltage.o + obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ +- cpuidle34xx.o pm_bus.o ++ cpuidle34xx.o pm_bus.o dvfs.o + obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o + obj-$(CONFIG_PM_DEBUG) += pm-debug.o + obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o +diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c +new file mode 100644 +index 0000000..8832e4a +--- /dev/null ++++ b/arch/arm/mach-omap2/dvfs.c +@@ -0,0 +1,456 @@ ++/* ++ * OMAP3/OMAP4 DVFS Management Routines ++ * ++ * Author: Vishwanath BS <vishwanath.bs@ti.com> ++ * ++ * Copyright (C) 2011 Texas Instruments, Inc. ++ * Vishwanath BS <vishwanath.bs@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/err.h> ++#include <linux/spinlock.h> ++#include <linux/plist.h> ++#include <linux/slab.h> ++#include <linux/opp.h> ++#include <plat/common.h> ++#include <plat/voltage.h> ++#include <plat/omap_device.h> ++ ++/** ++ * struct omap_dev_user_list - Structure maitain userlist per devide ++ * ++ * @dev: The device requesting for a particular frequency ++ * @node: The list head entry ++ * @freq: frequency being requested ++ * ++ * Using this structure, user list (requesting dev * and frequency) for ++ * each device is maintained. This is how we can have different devices ++ * at different frequencies (to support frequency locking and throttling). ++ * Even if one of the devices in a given vdd has locked it's frequency, ++ * other's can still scale their frequency using this list. ++ * If no one has placed a frequency request for a device, then device is ++ * set to the frequency from it's opp table. ++ */ ++struct omap_dev_user_list { ++ struct device *dev; ++ struct plist_node node; ++ u32 freq; ++}; ++ ++/** ++ * struct omap_vdd_dev_list - Device list per vdd ++ * ++ * @dev: The device belonging to a particular vdd ++ * @node: The list head entry ++ */ ++struct omap_vdd_dev_list { ++ struct device *dev; ++ struct list_head node; ++ struct plist_head user_list; ++ spinlock_t user_lock; /* spinlock for plist */ ++}; ++ ++/** ++ * struct omap_vdd_user_list - The per vdd user list ++ * ++ * @dev: The device asking for the vdd to be set at a particular ++ * voltage ++ * @node: The list head entry ++ * @volt: The voltage requested by the device <dev> ++ */ ++struct omap_vdd_user_list { ++ struct device *dev; ++ struct plist_node node; ++ u32 volt; ++}; ++ ++/** ++ * struct omap_vdd_dvfs_info - The per vdd dvfs info ++ * ++ * @user_lock: spinlock for plist operations ++ * @user_list: The vdd user list ++ * @scaling_mutex: Mutex for protecting dvfs data structures for a vdd ++ * @voltdm: Voltage domains for which dvfs info stored ++ * ++ * This is a fundamental structure used to store all the required ++ * DVFS related information for a vdd. ++ */ ++struct omap_vdd_dvfs_info { ++ spinlock_t user_lock; /* spin lock */ ++ struct plist_head user_list; ++ struct mutex scaling_mutex; /* dvfs mutex */ ++ struct voltagedomain *voltdm; ++ struct list_head dev_list; ++}; ++ ++static struct omap_vdd_dvfs_info *omap_dvfs_info_list; ++static int omap_nr_vdd; ++ ++static struct voltagedomain omap3_vdd[] = { ++ { ++ .name = "mpu", ++ }, ++ { ++ .name = "core", ++ }, ++}; ++ ++static int __init omap_dvfs_init(void); ++ ++static struct omap_vdd_dvfs_info *get_dvfs_info(struct voltagedomain *voltdm) ++{ ++ int i; ++ if (!voltdm || !omap_dvfs_info_list) ++ return NULL; ++ ++ for (i = 0; i < omap_nr_vdd; i++) ++ if (omap_dvfs_info_list[i].voltdm == voltdm) ++ return &omap_dvfs_info_list[i]; ++ ++ pr_warning("%s: unable find dvfs info for vdd %s\n", ++ __func__, voltdm->name); ++ return NULL; ++} ++ ++/** ++ * omap_dvfs_find_voltage() - search for given voltage ++ * @dev: device pointer associated with the opp type ++ * @volt: voltage to search for ++ * ++ * Searches for exact match in the opp list and returns handle to the matching ++ * opp if found, else returns ERR_PTR in case of error and should be handled ++ * using IS_ERR. If there are multiple opps with same voltage, it will return ++ * the first available entry. ++ */ ++static struct opp *omap_dvfs_find_voltage(struct device *dev, ++ unsigned long volt) ++{ | ||
[-] [+] | Added | linux-2.6-dvfs-0018-OMAP-Introduce-device-specific-set-rate-and-get-rate.patch ^ |
@@ -0,0 +1,121 @@ +From e935f7389455ab290e75e4d54a4bbe7571fcb1e1 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 21 Jan 2011 19:30:54 +0530 +Subject: [PATCH 18/32] OMAP: Introduce device specific set rate and get rate in omap_device structure + +This patch extends the omap_device structure to contain pointers to scale the +operating rate of the device and to retrieve the operating rate of the device. +This patch also adds the three new APIs in the omap device layer +namely omap_device_set_rate that can be called to set a new operating +rate for a device, omap_device_get_rate that can be called to retrieve +the operating frequency for a device and omap_device_register_dvfs_callbacks +to register the device specific set_rate and get_rate functions. +The omap_device_set_rate and omap_device_get_rate does some routine error +checks and finally calls into the device specific set_rate +and get_rate APIs populated through omap_device_populate_rate_fns. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +[jhnikula@gmail.com: omap_device.h change applied manually] +--- + arch/arm/plat-omap/include/plat/omap_device.h | 9 +++++ + arch/arm/plat-omap/omap_device.c | 49 +++++++++++++++++++++++++ + 2 files changed, 58 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h +index 28e2d1a..e4f6783 100644 +--- a/arch/arm/plat-omap/include/plat/omap_device.h ++++ b/arch/arm/plat-omap/include/plat/omap_device.h +@@ -50,6 +50,8 @@ extern struct device omap_device_parent; + * @hwmods: (one .. many per omap_device) + * @hwmods_cnt: ARRAY_SIZE() of @hwmods + * @pm_lats: ptr to an omap_device_pm_latency table ++ * @set_rate: fn ptr to change the operating rate. ++ * @get_rate: fn ptr to retrieve the current operating rate. + * @pm_lats_cnt: ARRAY_SIZE() of what is passed to @pm_lats + * @pm_lat_level: array index of the last odpl entry executed - -1 if never + * @dev_wakeup_lat: dev wakeup latency in nanoseconds +@@ -73,6 +75,8 @@ struct omap_device { + s8 pm_lat_level; + u8 hwmods_cnt; + u8 _state; ++ int (*set_rate)(struct device *dev, unsigned long rate); ++ unsigned long (*get_rate) (struct device *dev); + }; + + /* Device driver interface (call via platform_data fn ptrs) */ +@@ -107,6 +111,11 @@ void __iomem *omap_device_get_rt_va(struct omap_device *od); + int omap_device_align_pm_lat(struct platform_device *pdev, + u32 new_wakeup_lat_limit); + struct powerdomain *omap_device_get_pwrdm(struct omap_device *od); ++int omap_device_set_rate(struct device *dev, unsigned long freq); ++unsigned long omap_device_get_rate(struct device *dev); ++void omap_device_register_dvfs_callbacks(struct device *dev, ++ int (*set_rate)(struct device *dev, unsigned long rate), ++ unsigned long (*get_rate) (struct device *dev)); + + /* Other */ + +diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c +index 269af0f..2185839 100644 +--- a/arch/arm/plat-omap/omap_device.c ++++ b/arch/arm/plat-omap/omap_device.c +@@ -782,6 +782,55 @@ int omap_device_enable_clocks(struct omap_device *od) + return 0; + } + ++int omap_device_set_rate(struct device *dev, unsigned long freq) ++{ ++ struct platform_device *pdev; ++ struct omap_device *od; ++ ++ pdev = container_of(dev, struct platform_device, dev); ++ od = _find_by_pdev(pdev); ++ ++ if (!od->set_rate) { ++ dev_err(dev, "%s: No set_rate API for scaling device\n", ++ __func__); ++ return -ENODATA; ++ } ++ ++ return od->set_rate(dev, freq); ++} ++ ++unsigned long omap_device_get_rate(struct device *dev) ++{ ++ struct platform_device *pdev; ++ struct omap_device *od; ++ ++ pdev = container_of(dev, struct platform_device, dev); ++ od = _find_by_pdev(pdev); ++ ++ ++ if (!od->get_rate) { ++ dev_err(dev, "%s: No get rate API for the device\n", ++ __func__); ++ return 0; ++ } ++ ++ return od->get_rate(dev); ++} ++ ++void omap_device_register_dvfs_callbacks(struct device *dev, ++ int (*set_rate)(struct device *dev, unsigned long rate), ++ unsigned long (*get_rate) (struct device *dev)) ++{ ++ struct platform_device *pdev; ++ struct omap_device *od; ++ ++ pdev = container_of(dev, struct platform_device, dev); ++ od = _find_by_pdev(pdev); ++ ++ od->set_rate = set_rate; ++ od->get_rate = get_rate; ++} ++ + struct device omap_device_parent = { + .init_name = "omap", + .parent = &platform_bus, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0019-OMAP-Implement-Basic-DVFS.patch ^ |
@@ -0,0 +1,126 @@ +From 79a173a39fce604d21564ea2bad90ff82f326d53 Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:30:55 +0530 +Subject: [PATCH 19/32] OMAP: Implement Basic DVFS + +This patch introduces an API to perform DVFS for a given voltage domain. +It takes omap_vdd_dvfs_info pointer as input parameter, computes the highest +requested voltage for that vdd and scales all the devices in that vdd to the +requested frequency along with voltage scaling. + +Based on original patch from Thara. + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +Cc: Thara Gopinath <thara@ti.com> +--- + arch/arm/mach-omap2/dvfs.c | 87 +++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 86 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c +index 8832e4a..cefc2be 100644 +--- a/arch/arm/mach-omap2/dvfs.c ++++ b/arch/arm/mach-omap2/dvfs.c +@@ -21,7 +21,7 @@ + #include <plat/omap_device.h> + + /** +- * struct omap_dev_user_list - Structure maitain userlist per devide ++ * struct omap_dev_user_list - Structure maitain userlist per device + * + * @dev: The device requesting for a particular frequency + * @node: The list head entry +@@ -413,6 +413,91 @@ static int omap_dvfs_remove_freq_request(struct omap_vdd_dvfs_info *dvfs_info, + } + + /** ++ * omap_dvfs_voltage_scale() : API to scale the devices associated with a ++ * voltage domain vdd voltage. ++ * ++ * @dvfs_info: omap_vdd_dvfs_info pointer for the required vdd ++ * ++ * This API runs through the list of devices associated with the ++ * voltage domain and scales the device rates to the one requested ++ * by the user or those corresponding to the new voltage of the ++ * voltage domain. Target voltage is the highest voltage in the vdd_user_list. ++ * ++ * Returns 0 on success ++ * else the error value. ++ */ ++static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) ++{ ++ unsigned long curr_volt; ++ int is_volt_scaled = 0; ++ struct omap_vdd_dev_list *temp_dev; ++ struct plist_node *node; ++ int ret = 0; ++ struct voltagedomain *voltdm; ++ unsigned long volt; ++ ++ if (!dvfs_info || IS_ERR(dvfs_info)) { ++ pr_warning("%s: VDD specified does not exist!\n", __func__); ++ return -EINVAL; ++ } ++ ++ voltdm = dvfs_info->voltdm; ++ ++ mutex_lock(&dvfs_info->scaling_mutex); ++ ++ /* Find the highest voltage being requested */ ++ node = plist_last(&dvfs_info->user_list); ++ volt = node->prio; ++ ++ curr_volt = omap_voltage_get_nom_volt(voltdm); ++ ++ if (curr_volt == volt) { ++ is_volt_scaled = 1; ++ } else if (curr_volt < volt) { ++ ret = omap_voltage_scale_vdd(voltdm, volt); ++ if (ret) { ++ pr_warning("%s: Unable to scale the %s to %ld volt\n", ++ __func__, voltdm->name, volt); ++ mutex_unlock(&dvfs_info->scaling_mutex); ++ return ret; ++ } ++ is_volt_scaled = 1; ++ } ++ ++ list_for_each_entry(temp_dev, &dvfs_info->dev_list, node) { ++ struct device *dev; ++ struct opp *opp; ++ unsigned long freq; ++ ++ dev = temp_dev->dev; ++ if (!plist_head_empty(&temp_dev->user_list)) { ++ node = plist_last(&temp_dev->user_list); ++ freq = node->prio; ++ } else { ++ opp = omap_dvfs_find_voltage(dev, volt); ++ if (IS_ERR(opp)) ++ continue; ++ freq = opp_get_freq(opp); ++ } ++ ++ if (freq == omap_device_get_rate(dev)) { ++ dev_dbg(dev, "%s: Already at the requested" ++ "rate %ld\n", __func__, freq); ++ continue; ++ } ++ ++ ret |= omap_device_set_rate(dev, freq); ++ } ++ ++ if (!is_volt_scaled && !ret) ++ omap_voltage_scale_vdd(voltdm, volt); ++ ++ mutex_unlock(&dvfs_info->scaling_mutex); ++ ++ return 0; ++} ++ ++/** + * omap_dvfs_init() - Initialize omap dvfs layer + * + * Initalizes omap dvfs layer. It basically allocates memory for +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0020-OMAP-Introduce-dependent-voltage-domain-support.patch ^ |
@@ -0,0 +1,451 @@ +From f187e930dbdfb19b71b35950450d3168f526cbbb Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:30:56 +0530 +Subject: [PATCH 20/32] OMAP: Introduce dependent voltage domain support + +There could be dependencies between various voltage domains for +maintaining system performance or hardware limitation reasons +like VDD<X> should be at voltage v1 when VDD<Y> is at voltage v2. +This patch introduce dependent vdd information structures in the +voltage layer which can be used to populate these dependencies +for a voltage domain. This patch also adds support to scale +the dependent vdd and the scalable devices belonging to it +during the scaling of a main vdd through omap_voltage_scale. + +As part of this, some of the voltage layer structure definitions are moved from +voltage.c to voltage.h as it needs to be used in the dvfs layer for dependency +voltage handling. + +Based on original patch from Thara. + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +Cc: Thara Gopinath <thara@ti.com> +--- + arch/arm/mach-omap2/dvfs.c | 87 +++++++++++++++++ + arch/arm/mach-omap2/voltage.c | 117 ----------------------- + arch/arm/plat-omap/include/plat/voltage.h | 148 +++++++++++++++++++++++++++++ + 3 files changed, 235 insertions(+), 117 deletions(-) + +diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c +index cefc2be..c9d3894 100644 +--- a/arch/arm/mach-omap2/dvfs.c ++++ b/arch/arm/mach-omap2/dvfs.c +@@ -85,6 +85,7 @@ struct omap_vdd_dvfs_info { + struct mutex scaling_mutex; /* dvfs mutex */ + struct voltagedomain *voltdm; + struct list_head dev_list; ++ struct device vdd_device; + }; + + static struct omap_vdd_dvfs_info *omap_dvfs_info_list; +@@ -98,6 +99,7 @@ static struct voltagedomain omap3_vdd[] = { + .name = "core", + }, + }; ++static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info); + + static int __init omap_dvfs_init(void); + +@@ -412,6 +414,79 @@ static int omap_dvfs_remove_freq_request(struct omap_vdd_dvfs_info *dvfs_info, + return ret; + } + ++/* Calculate dependency vdd voltage for given vdd voltage */ ++static int calc_dep_vdd_volt(struct device *dev, ++ struct omap_vdd_info *main_vdd, unsigned long main_volt) ++{ ++ struct omap_vdd_dep_info *dep_vdds; ++ int i, ret = 0; ++ ++ if (!main_vdd->dep_vdd_info) { ++ pr_debug("%s: No dependent VDD's for vdd_%s\n", ++ __func__, main_vdd->voltdm.name); ++ return 0; ++ } ++ ++ dep_vdds = main_vdd->dep_vdd_info; ++ ++ for (i = 0; i < main_vdd->nr_dep_vdd; i++) { ++ struct omap_vdd_dep_volt *volt_table = dep_vdds[i].dep_table; ++ int nr_volt = 0; ++ unsigned long dep_volt = 0, act_volt = 0; ++ ++ while (volt_table[nr_volt].main_vdd_volt != 0) { ++ if (volt_table[nr_volt].main_vdd_volt == main_volt) { ++ dep_volt = volt_table[nr_volt].dep_vdd_volt; ++ break; ++ } ++ nr_volt++; ++ } ++ if (!dep_volt) { ++ pr_warning("%s: Not able to find a matching volt for" ++ "vdd_%s corresponding to vdd_%s %ld volt\n", ++ __func__, dep_vdds[i].name, ++ main_vdd->voltdm.name, main_volt); ++ ret = -EINVAL; ++ continue; ++ } ++ ++ if (!dep_vdds[i].voltdm) ++ dep_vdds[i].voltdm = ++ omap_voltage_domain_lookup(dep_vdds[i].name); ++ ++ act_volt = dep_volt; ++ ++ /* See if dep_volt is possible for the vdd*/ ++ ret = omap_dvfs_add_vdd_user(get_dvfs_info(dep_vdds[i].voltdm), ++ dev, act_volt); ++ } ++ ++ return ret; ++} ++ ++/* Scale dependent VDD */ ++static int scale_dep_vdd(struct omap_vdd_dvfs_info *vdd_info) ++{ ++ struct omap_vdd_dep_info *dep_vdds; ++ int i; ++ struct omap_vdd_info *main_vdd; ++ struct voltagedomain *voltdm = vdd_info->voltdm; ++ main_vdd = container_of(voltdm, struct omap_vdd_info, voltdm); ++ ++ if (!main_vdd->dep_vdd_info) { ++ pr_debug("%s: No dependent VDD's for vdd_%s\n", ++ __func__, main_vdd->voltdm.name); ++ return 0; ++ } ++ ++ dep_vdds = main_vdd->dep_vdd_info; ++ ++ for (i = 0; i < main_vdd->nr_dep_vdd; i++) ++ omap_dvfs_voltage_scale(get_dvfs_info(dep_vdds[i].voltdm)); ++ ++ return 0; ++} ++ + /** + * omap_dvfs_voltage_scale() : API to scale the devices associated with a + * voltage domain vdd voltage. +@@ -435,6 +510,7 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + int ret = 0; + struct voltagedomain *voltdm; + unsigned long volt; ++ struct omap_vdd_info *vdd; + + if (!dvfs_info || IS_ERR(dvfs_info)) { + pr_warning("%s: VDD specified does not exist!\n", __func__); +@@ -442,6 +518,7 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + } + + voltdm = dvfs_info->voltdm; ++ vdd = container_of(voltdm, struct omap_vdd_info, voltdm); + + mutex_lock(&dvfs_info->scaling_mutex); + +@@ -494,6 +571,16 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + + mutex_unlock(&dvfs_info->scaling_mutex); + ++ /* calculate the voltages for dependent vdd's */ ++ if (calc_dep_vdd_volt(&dvfs_info->vdd_device, vdd, volt)) { ++ pr_warning("%s: Error in calculating dependent vdd voltages" ++ "for vdd_%s\n", __func__, voltdm->name); ++ return -EINVAL; ++ } ++ ++ /* Scale dependent vdds */ ++ scale_dep_vdd(dvfs_info); ++ + return 0; + } + +diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c +index 8324573..b131e11 100644 +--- a/arch/arm/mach-omap2/voltage.c ++++ b/arch/arm/mach-omap2/voltage.c +@@ -35,123 +35,6 @@ + #define VP_TRANXDONE_TIMEOUT 300 + #define VOLTAGE_DIR_SIZE 16 + +-/* Voltage processor register offsets */ +-struct vp_reg_offs { +- u8 vpconfig; +- u8 vstepmin; +- u8 vstepmax; +- u8 vlimitto; +- u8 vstatus; +- u8 voltage; +-}; +- +-/* Voltage Processor bit field values, shifts and masks */ +-struct vp_reg_val { +- /* PRM module */ +- u16 prm_mod; +- /* VPx_VPCONFIG */ +- u32 vpconfig_erroroffset; +- u16 vpconfig_errorgain; +- u32 vpconfig_errorgain_mask; +- u8 vpconfig_errorgain_shift; +- u32 vpconfig_initvoltage_mask; +- u8 vpconfig_initvoltage_shift; +- u32 vpconfig_timeouten; +- u32 vpconfig_initvdd; +- u32 vpconfig_forceupdate; +- u32 vpconfig_vpenable; +- /* VPx_VSTEPMIN */ +- u8 vstepmin_stepmin; +- u16 vstepmin_smpswaittimemin; +- u8 vstepmin_stepmin_shift; +- u8 vstepmin_smpswaittimemin_shift; | ||
[-] [+] | Added | linux-2.6-dvfs-0021-OMAP-Introduce-device-scale-implementation.patch ^ |
@@ -0,0 +1,177 @@ +From b649627dfc5c7459eb8f364c21f49c283b33b501 Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:30:57 +0530 +Subject: [PATCH 21/32] OMAP: Introduce device scale implementation + +This patch adds omap_device_scale API which can be used to generic +device rate scaling. + +Based on original patch from Thara. + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +Cc: Thara Gopinath <thara@ti.com> +--- + arch/arm/mach-omap2/dvfs.c | 116 ++++++++++++++++++++++++++++++++ + arch/arm/plat-omap/include/plat/dvfs.h | 7 ++ + 2 files changed, 123 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c +index c9d3894..05a9ce3 100644 +--- a/arch/arm/mach-omap2/dvfs.c ++++ b/arch/arm/mach-omap2/dvfs.c +@@ -19,6 +19,7 @@ + #include <plat/common.h> + #include <plat/voltage.h> + #include <plat/omap_device.h> ++#include <plat/smartreflex.h> + + /** + * struct omap_dev_user_list - Structure maitain userlist per device +@@ -585,6 +586,121 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + } + + /** ++ * omap_device_scale() - Set a new rate at which the device is to operate ++ * @req_dev: pointer to the device requesting the scaling. ++ * @target_dev: pointer to the device that is to be scaled ++ * @rate: the rnew rate for the device. ++ * ++ * This API gets the device opp table associated with this device and ++ * tries putting the device to the requested rate and the voltage domain ++ * associated with the device to the voltage corresponding to the ++ * requested rate. Since multiple devices can be assocciated with a ++ * voltage domain this API finds out the possible voltage the ++ * voltage domain can enter and then decides on the final device ++ * rate. Return 0 on success else the error value ++ */ ++int omap_device_scale(struct device *req_dev, struct device *target_dev, ++ unsigned long rate) ++{ ++ struct opp *opp; ++ unsigned long volt, freq, min_freq, max_freq; ++ struct omap_vdd_dvfs_info *dvfs_info; ++ struct platform_device *pdev; ++ struct omap_device *od; ++ int ret = 0; ++ ++ pdev = container_of(target_dev, struct platform_device, dev); ++ od = container_of(pdev, struct omap_device, pdev); ++ ++ /* ++ * Figure out if the desired frquency lies between the ++ * maximum and minimum possible for the particular device ++ */ ++ min_freq = 0; ++ if (IS_ERR(opp_find_freq_ceil(target_dev, &min_freq))) { ++ dev_err(target_dev, "%s: Unable to find lowest opp\n", ++ __func__); ++ return -ENODEV; ++ } ++ ++ max_freq = ULONG_MAX; ++ if (IS_ERR(opp_find_freq_floor(target_dev, &max_freq))) { ++ dev_err(target_dev, "%s: Unable to find highest opp\n", ++ __func__); ++ return -ENODEV; ++ } ++ ++ if (rate < min_freq) ++ freq = min_freq; ++ else if (rate > max_freq) ++ freq = max_freq; ++ else ++ freq = rate; ++ ++ opp = opp_find_freq_ceil(target_dev, &freq); ++ if (IS_ERR(opp)) { ++ dev_err(target_dev, "%s: Unable to find OPP for freq%ld\n", ++ __func__, rate); ++ return -ENODEV; ++ } ++ ++ /* Get the voltage corresponding to the requested frequency */ ++ volt = opp_get_voltage(opp); ++ ++ /* ++ * Call into the voltage layer to get the final voltage possible ++ * for the voltage domain associated with the device. ++ */ ++ ++ if (rate) { ++ dvfs_info = get_dvfs_info(od->hwmods[0]->voltdm); ++ ++ ret = omap_dvfs_add_freq_request(dvfs_info, req_dev, ++ target_dev, freq); ++ if (ret) { ++ dev_err(target_dev, "%s: Unable to add frequency request\n", ++ __func__); ++ return ret; ++ } ++ ++ ret = omap_dvfs_add_vdd_user(dvfs_info, req_dev, volt); ++ if (ret) { ++ dev_err(target_dev, "%s: Unable to add voltage request\n", ++ __func__); ++ omap_dvfs_remove_freq_request(dvfs_info, req_dev, ++ target_dev); ++ return ret; ++ } ++ } else { ++ dvfs_info = get_dvfs_info(od->hwmods[0]->voltdm); ++ ++ ret = omap_dvfs_remove_freq_request(dvfs_info, req_dev, ++ target_dev); ++ if (ret) { ++ dev_err(target_dev, "%s: Unable to remove frequency request\n", ++ __func__); ++ return ret; ++ } ++ ++ ret = omap_dvfs_remove_vdd_user(dvfs_info, req_dev); ++ if (ret) { ++ dev_err(target_dev, "%s: Unable to remove voltage request\n", ++ __func__); ++ return ret; ++ } ++ } ++ ++ /* Do the actual scaling */ ++ ret = omap_dvfs_voltage_scale(dvfs_info); ++ if (!ret) ++ if (omap_device_get_rate(target_dev) >= rate) ++ return 0; ++ ++ return ret; ++} ++EXPORT_SYMBOL(omap_device_scale); ++ ++/** + * omap_dvfs_init() - Initialize omap dvfs layer + * + * Initalizes omap dvfs layer. It basically allocates memory for +diff --git a/arch/arm/plat-omap/include/plat/dvfs.h b/arch/arm/plat-omap/include/plat/dvfs.h +index 1302990..1be2b9d 100644 +--- a/arch/arm/plat-omap/include/plat/dvfs.h ++++ b/arch/arm/plat-omap/include/plat/dvfs.h +@@ -17,11 +17,18 @@ + + #ifdef CONFIG_PM + int omap_dvfs_register_device(struct voltagedomain *voltdm, struct device *dev); ++int omap_device_scale(struct device *req_dev, struct device *dev, ++ unsigned long rate); + #else + static inline int omap_dvfs_register_device(struct voltagedomain *voltdm, + struct device *dev) + { + return -EINVAL; + } ++static inline int omap_device_scale(struct device *req_dev, struct devices ++ *target_dev, unsigned long rate); ++{ ++ return -EINVAL; ++} + #endif + #endif +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0022-OMAP-Disable-Smartreflex-across-DVFS.patch ^ |
@@ -0,0 +1,51 @@ +From 0630fc7ee536656fafb80c2f9c4a43629843fe97 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 21 Jan 2011 19:30:58 +0530 +Subject: [PATCH 22/32] OMAP: Disable Smartreflex across DVFS + +This patch disables smartreflex for a particular voltage +domain when the the voltage domain and the devices belonging +to it is being scaled and re-enables it back once the scaling +is done. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +--- + arch/arm/mach-omap2/dvfs.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/dvfs.c b/arch/arm/mach-omap2/dvfs.c +index 05a9ce3..1e5492c 100644 +--- a/arch/arm/mach-omap2/dvfs.c ++++ b/arch/arm/mach-omap2/dvfs.c +@@ -529,6 +529,9 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + + curr_volt = omap_voltage_get_nom_volt(voltdm); + ++ /* Disable smartreflex module across voltage and frequency scaling */ ++ omap_sr_disable(voltdm); ++ + if (curr_volt == volt) { + is_volt_scaled = 1; + } else if (curr_volt < volt) { +@@ -536,6 +539,7 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + if (ret) { + pr_warning("%s: Unable to scale the %s to %ld volt\n", + __func__, voltdm->name, volt); ++ omap_sr_enable(voltdm); + mutex_unlock(&dvfs_info->scaling_mutex); + return ret; + } +@@ -570,6 +574,9 @@ static int omap_dvfs_voltage_scale(struct omap_vdd_dvfs_info *dvfs_info) + if (!is_volt_scaled && !ret) + omap_voltage_scale_vdd(voltdm, volt); + ++ /* Enable Smartreflex module */ ++ omap_sr_enable(voltdm); ++ + mutex_unlock(&dvfs_info->scaling_mutex); + + /* calculate the voltages for dependent vdd's */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0023-OMAP3-Introduce-custom-set-rate-and-get-rate-APIs-fo.patch ^ |
@@ -0,0 +1,125 @@ +From 6436690eff191cd7396c7c71af74c1be700910fb Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 21 Jan 2011 19:30:59 +0530 +Subject: [PATCH 23/32] OMAP3: Introduce custom set rate and get rate APIs for scalable devices + +This patch also introduces omap3_mpu_set_rate, omap3_iva_set_rate, +omap3_l3_set_rate, omap3_mpu_get_rate, omap3_iva_get_rate, +omap3_l3_get_rate as device specific set rate and get rate +APIs for OMAP3 mpu, iva and l3_main devices. This patch also +calls into omap_device_populate_rate_fns during system init to register +various set_rate and get_rate APIs with the omap device layer + +Signed-off-by: Thara Gopinath <thara@ti.com> +[jhnikula@gmail.com: Replaced s/cm2xxx_3xxx.h/cm.h/ and +s/omap2_cm_read_mod_reg/cm_read_mod_reg/ as that change is in 2.6.38] +--- + arch/arm/mach-omap2/pm.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 71 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index 3f2cadd..dc3a6bb 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -23,6 +23,9 @@ + #include <plat/powerdomain.h> + #include <plat/clockdomain.h> + #include "pm.h" ++#include "cm.h" ++#include "cm-regbits-34xx.h" ++#include "prm.h" + + static struct omap_device_pm_latency *pm_lats; + +@@ -31,6 +34,8 @@ static struct device *iva_dev; + static struct device *l3_dev; + static struct device *dsp_dev; + ++static struct clk *dpll1_clk, *dpll2_clk, *dpll3_clk; ++ + struct device *omap2_get_mpuss_device(void) + { + WARN_ON_ONCE(!mpu_dev); +@@ -77,6 +82,55 @@ static int _init_omap_device(char *name, struct device **new_dev) + return 0; + } + ++static unsigned long omap3_mpu_get_rate(struct device *dev) ++{ ++ return dpll1_clk->rate; ++} ++ ++static int omap3_mpu_set_rate(struct device *dev, unsigned long rate) ++{ ++ int ret; ++ ++ ret = clk_set_rate(dpll1_clk, rate); ++ if (ret) { ++ dev_warn(dev, "%s: Unable to set rate to %ld\n", ++ __func__, rate); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static int omap3_iva_set_rate(struct device *dev, unsigned long rate) ++{ ++ return clk_set_rate(dpll2_clk, rate); ++} ++ ++static unsigned long omap3_iva_get_rate(struct device *dev) ++{ ++ return dpll2_clk->rate; ++} ++ ++static int omap3_l3_set_rate(struct device *dev, unsigned long rate) ++{ ++ int l3_div; ++ ++ l3_div = cm_read_mod_reg(CORE_MOD, CM_CLKSEL) & ++ OMAP3430_CLKSEL_L3_MASK; ++ ++ return clk_set_rate(dpll3_clk, rate * l3_div); ++} ++ ++static unsigned long omap3_l3_get_rate(struct device *dev) ++{ ++ int l3_div; ++ ++ l3_div = cm_read_mod_reg(CORE_MOD, CM_CLKSEL) & ++ OMAP3430_CLKSEL_L3_MASK; ++ return dpll3_clk->rate / l3_div; ++} ++ ++ + /* + * Build omap_devices for processors and bus. + */ +@@ -90,6 +144,23 @@ static void omap2_init_processor_devices(void) + } else { + _init_omap_device("l3_main", &l3_dev); + } ++ ++ if (cpu_is_omap34xx()) { ++ dpll1_clk = clk_get(NULL, "dpll1_ck"); ++ dpll2_clk = clk_get(NULL, "dpll2_ck"); ++ dpll3_clk = clk_get(NULL, "dpll3_m2_ck"); ++ ++ if (mpu_dev) ++ omap_device_register_dvfs_callbacks(mpu_dev, ++ omap3_mpu_set_rate, omap3_mpu_get_rate); ++ if (iva_dev) ++ omap_device_register_dvfs_callbacks(iva_dev, ++ omap3_iva_set_rate, omap3_iva_get_rate); ++ if (l3_dev) ++ omap_device_register_dvfs_callbacks(l3_dev, ++ omap3_l3_set_rate, omap3_l3_get_rate); ++ ++ } + } + + /* +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0024-OMAP3-cpufreq-driver-changes-for-DVFS-support.patch ^ |
@@ -0,0 +1,85 @@ +From 18d5c94ba15f56c91ddd297ca6970dfbaa2160ab Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:31:00 +0530 +Subject: [PATCH 24/32] OMAP3: cpufreq driver changes for DVFS support + +Changes in the omap cpufreq driver for DVFS support. + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> +--- + arch/arm/plat-omap/cpu-omap.c | 35 ++++++++++++++++++++++++++++++++--- + 1 files changed, 32 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index 1c1b80b..d965220 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -30,10 +30,12 @@ + #include <mach/hardware.h> + #include <plat/clock.h> + #include <asm/system.h> ++#include <asm/cpu.h> + + #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) + #include <plat/omap-pm.h> + #include <plat/common.h> ++#include <plat/dvfs.h> + #endif + + #define VERY_HI_RATE 900000000 +@@ -85,11 +87,11 @@ 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; ++ int i; ++ struct cpufreq_freqs freqs_notify; + struct device *mpu_dev = omap2_get_mpuss_device(); + #endif + int ret = 0; +@@ -116,9 +118,36 @@ static int omap_target(struct cpufreq_policy *policy, + 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) ++ freqs.old = omap_getspeed(policy->cpu);; ++ freqs_notify.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; ++ freqs.cpu = policy->cpu; ++ ++ if (freqs.old == freqs.new) ++ return ret; ++ ++ /* pre notifiers */ ++ for_each_cpu(i, policy->cpus) { ++ freqs.cpu = i; ++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ } ++ ++ /* scale the frequency */ + freq = target_freq * 1000; + if (opp_find_freq_ceil(mpu_dev, &freq)) +- omap_pm_cpu_set_freq(freq); ++ omap_device_scale(mpu_dev, mpu_dev, freq); ++ ++ /* Update loops per jiffy */ ++ freqs.new = omap_getspeed(policy->cpu); ++ 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); ++ ++ /* post notifiers */ ++ for_each_cpu(i, policy->cpus) { ++ freqs.cpu = i; ++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++ } + #endif + return ret; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0025-OMAP3-Introduce-voltage-domain-info-in-the-hwmod-str.patch ^ |
@@ -0,0 +1,45 @@ +From bffc3a6ffff9c9d959eb8ff9af49118835116d1b Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 21 Jan 2011 19:31:01 +0530 +Subject: [PATCH 25/32] OMAP3: Introduce voltage domain info in the hwmod structures. + +This patch adds voltage domain info in the relevant +device hwmod structures so as to enable OMAP3 DVFS +support. + +Signed-off-by: Thara Gopinath <thara@ti.com> +--- + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +index f780279..6e67418 100644 +--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c ++++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +@@ -79,6 +79,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { + static struct omap_hwmod omap3xxx_l3_main_hwmod = { + .name = "l3_main", + .class = &l3_hwmod_class, ++ .vdd_name = "core", + .masters = omap3xxx_l3_main_masters, + .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), + .slaves = omap3xxx_l3_main_slaves, +@@ -288,6 +289,7 @@ static struct omap_hwmod omap3xxx_mpu_hwmod = { + .name = "mpu", + .class = &mpu_hwmod_class, + .main_clk = "arm_fck", ++ .vdd_name = "mpu", + .masters = omap3xxx_mpu_masters, + .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), +@@ -316,6 +318,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_iva_masters[] = { + static struct omap_hwmod omap3xxx_iva_hwmod = { + .name = "iva", + .class = &iva_hwmod_class, ++ .vdd_name = "mpu", + .masters = omap3xxx_iva_masters, + .masters_cnt = ARRAY_SIZE(omap3xxx_iva_masters), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0026-OMAP3-Add-voltage-dependency-table-for-VDD1.patch ^ |
@@ -0,0 +1,88 @@ +From c460e7a7014a8b43d3c59210a557f2352bc213de Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 21 Jan 2011 19:31:02 +0530 +Subject: [PATCH 26/32] OMAP3: Add voltage dependency table for VDD1. + +In OMAP3, for perfomrance reasons when VDD1 is at voltage above +1.075V, VDD2 should be at 1.15V for perfomrance reasons. This +patch introduce this cross VDD dependency for OMAP3 VDD1. + +Signed-off-by: Thara Gopinath <thara@ti.com> + +This patch has checkpatch warnings for line over 80 chars. It is not fixed for +code readability. + +[jhnikula@gmail.com: voltage.c: OMAP4430_VDD_CORE_OPPx's in +omap34xx_vdd1_vdd2_data replaced with OMAP3430_VDD_CORE_OPP3_UV. First +because of OMAP4430_VDD_CORE_OPPx is not available in 2.6.37, is wrong for +34xx (even the voltages are close) and since the DSS don't work if core +voltage is scaled.] +--- + arch/arm/mach-omap2/voltage.c | 42 +++++++++++++++++++++++++++++++++++++++- + 1 files changed, 40 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c +index b131e11..5571f46 100644 +--- a/arch/arm/mach-omap2/voltage.c ++++ b/arch/arm/mach-omap2/voltage.c +@@ -117,6 +117,39 @@ static struct omap_volt_data omap36xx_vddcore_volt_data[] = { + VOLT_DATA_DEFINE(0, 0, 0, 0), + }; + ++/* OMAP 3430 MPU Core VDD dependency table */ ++static struct omap_vdd_dep_volt omap34xx_vdd1_vdd2_data[] = { ++ {.main_vdd_volt = OMAP3430_VDD_MPU_OPP1_UV, .dep_vdd_volt = OMAP3430_VDD_CORE_OPP3_UV}, ++ {.main_vdd_volt = OMAP3430_VDD_MPU_OPP2_UV, .dep_vdd_volt = OMAP3430_VDD_CORE_OPP3_UV}, ++ {.main_vdd_volt = OMAP3430_VDD_MPU_OPP3_UV, .dep_vdd_volt = OMAP3430_VDD_CORE_OPP3_UV}, ++ {.main_vdd_volt = OMAP3430_VDD_MPU_OPP4_UV, .dep_vdd_volt = OMAP3430_VDD_CORE_OPP3_UV}, ++ {.main_vdd_volt = OMAP3430_VDD_MPU_OPP5_UV, .dep_vdd_volt = OMAP3430_VDD_CORE_OPP3_UV}, ++ {.main_vdd_volt = 0, .dep_vdd_volt = 0}, ++}; ++ ++static struct omap_vdd_dep_info omap34xx_vdd1_dep_info[] = { ++ { ++ .name = "core", ++ .dep_table = omap34xx_vdd1_vdd2_data, ++ }, ++}; ++ ++/* OMAP 3630 MPU Core VDD dependency table */ ++static struct omap_vdd_dep_volt omap36xx_vdd1_vdd2_data[] = { ++ {.main_vdd_volt = OMAP3630_VDD_MPU_OPP50_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP50_UV}, ++ {.main_vdd_volt = OMAP3630_VDD_MPU_OPP100_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, ++ {.main_vdd_volt = OMAP3630_VDD_MPU_OPP120_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, ++ {.main_vdd_volt = OMAP3630_VDD_MPU_OPP1G_UV, .dep_vdd_volt = OMAP3630_VDD_CORE_OPP100_UV}, ++ {.main_vdd_volt = 0, .dep_vdd_volt = 0}, ++}; ++ ++static struct omap_vdd_dep_info omap36xx_vdd1_dep_info[] = { ++ { ++ .name = "core", ++ .dep_table = omap36xx_vdd1_vdd2_data, ++ }, ++}; ++ + static struct dentry *voltage_dir; + + /* Init function pointers */ +@@ -611,10 +644,15 @@ static int __init omap3_vdd_data_configure(struct omap_vdd_info *vdd) + } + + if (!strcmp(vdd->voltdm.name, "mpu")) { +- if (cpu_is_omap3630()) ++ if (cpu_is_omap3630()) { + vdd->volt_data = omap36xx_vddmpu_volt_data; +- else ++ vdd->dep_vdd_info = omap36xx_vdd1_dep_info; ++ vdd->nr_dep_vdd = ARRAY_SIZE(omap36xx_vdd1_dep_info); ++ } else { + vdd->volt_data = omap34xx_vddmpu_volt_data; ++ vdd->dep_vdd_info = omap34xx_vdd1_dep_info; ++ vdd->nr_dep_vdd = ARRAY_SIZE(omap34xx_vdd1_dep_info); ++ } + + vdd->vp_reg.tranxdone_status = OMAP3430_VP1_TRANXDONE_ST_MASK; + vdd->vc_reg.cmdval_reg = OMAP3_PRM_VC_CMD_VAL_0_OFFSET; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0027-OMAP-Add-DVFS-Documentation.patch ^ |
@@ -0,0 +1,133 @@ +From 7e380dc4dd99888fa9934fd0843c9e9214698d04 Mon Sep 17 00:00:00 2001 +From: Vishwanath BS <vishwanath.bs@ti.com> +Date: Fri, 21 Jan 2011 19:31:05 +0530 +Subject: [PATCH 27/32] OMAP: Add DVFS Documentation + +Add Documentation for DVFS Framework + +Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> +--- + Documentation/arm/OMAP/omap_dvfs | 111 ++++++++++++++++++++++++++++++++++++++ + 1 files changed, 111 insertions(+), 0 deletions(-) + create mode 100644 Documentation/arm/OMAP/omap_dvfs + +diff --git a/Documentation/arm/OMAP/omap_dvfs b/Documentation/arm/OMAP/omap_dvfs +new file mode 100644 +index 0000000..b026643 +--- /dev/null ++++ b/Documentation/arm/OMAP/omap_dvfs +@@ -0,0 +1,111 @@ ++*=============* ++* DVFS Framework * ++*=============* ++(C) 2011 Vishwnath BS <vishwanath.bs@ti.com>, Texas Instruments Incorporated ++Contents ++-------- ++1. Introduction ++2. Data Structure Organization ++3. DVFS APIs ++ ++1. Introduction ++=============== ++DVFS is a technique that uses the optimal operating frequency and voltage to ++allow a task to be performed in the required amount of time. ++OMAP processors have voltage domains whose voltage can be scaled to ++various levels depending on which the operating frequencies of certain ++devices belonging to the domain will also need to be scaled. This voltage ++frequency tuple is known as Operating Performance Point (OPP). A device ++can have multiple OPP's. Also a voltage domain could be shared between ++multiple devices. Also there could be dependencies between various ++voltage domains for maintaining system performance like VDD<X> ++should be at voltage v1 when VDD<Y> is at voltage v2. ++ ++The design of this framework takes into account all the above mentioned points. ++To summarize the basic design of DVFS framework:- ++ ++1. Have device opp tables for each device whose operating frequency can be ++ scaled. This is easy now due to the existance of hwmod layer which ++ allow storing of device specific info. The device opp tables contain ++ the opp pairs (frequency voltage tuples), the voltage domain pointer ++ to which the device belongs to, the device specific set_rate and ++ get_rate API's which will do the actual scaling of the device frequency ++ and retrieve the current device frequency. ++2. Introduce use counting on a per VDD basis. This is to take care multiple ++ requests to scale a VDD. The VDD will be scaled to the maximum of the ++ voltages requested. ++3. Keep track of all scalable devices belonging to a particular voltage ++ domain the voltage layer. ++4. Keep track of frequency requests for each of the device. This will enable ++ to scale individual devices to different frequency (even w/o scaling voltage ++ aka frequency throttling) ++5. Generic dvfs API that can be called by anybody to scale a device opp. ++ This API takes the device pointer and frequency to which the device ++ needs to be scaled to. This API then internally finds out the voltage ++ domain to which the device belongs to and the voltage to which the voltage ++ domain needs to be put to for the device to be scaled to the new frequency ++ from he device opp table. Then this API will add requested frequency into ++ the corresponding target device frequency list and add voltage request to ++ the corresponding vdd. Subsequently it calls voltage scale function which ++ will find out the highest requested voltage for the given vdd and scales ++ the voltage to the required one. It also runs through the list of all ++ scalable devices belonging to this voltage domain and scale them to the ++ appropriate frequencies using the set_rate pointer in the device opp tables. ++6. Handle inter VDD dependecies. ++ ++ ++2. The Core DVFS data structure: ++================================= ++ ++ |-------------------| |-------------------| ++ |User2 (dev2, freq2)| |User4 (dev4, freq4)| ++ |-------^-----------| |-------^-----------| ++ | | ++ |-------|-----------| |-------|-----------| ++ |User1 (dev1, freq1)| |User3 (dev3, freq3)|(omap_dev_user_list) ++ |-------^-----------| |-------^-----------| ++ | | ++ |---|--------------| |------------------| ++ |--------->| DEV1 (dev) |------------>| DEV2 (dev) |(omap_vdd_dev_list) ++ | |omap_dev_user_list| |omap_dev_user_list| ++ | |------------------| |------------------| ++ | ++ |---------|-----------| ++ | VDD_n | ++ | omap_vdd_dev_list | ++ | omap_vdd_user_list |(omap_vdd_dvfs_info) ++ | | ++ |--------|------------| ++ | ++ | |------------| |------------| |--------------| ++ |---------> | vdd_user1 |->| vdd_user2 |->| vdd_user3 | (omap_vdd_user_list) ++ | (dev, volt)| | (dev, volt)| | (dev, volt) | ++ |------------| |------------| |--------------| ++ ++3. APIs: ++ ===== ++ 1. omap_device_scale - Set a new rate at which the device is to operate ++ ++ Examples: ++ 1. Simple Device scaling: ++ Suppose module M wants to put device dev1 to frequency f1. Let's say that mdev ++ is the device * for module M. Then this could be achieved by ++ ret = omap_device_scale(mdev, dev1, f1) ++ if (ret) ++ /* handle error *. ++ ++ 2. Frequency Throttling ++ Suppose say there are 2 modules M1 and M2 in Voltage domain VDDx. ++ Module M1 wants to set VDDx to OPP100 voltage which means M1 and M2 will ++ be running at OPP100 frequency. Suppose Module M2 wants to run at OPP50 ++ frequency (say f2_opp50) instead of OPP100. This can be achieved by ++ ++ /* this operation will place M1 and M2 to run at OPP100 */ ++ ret = omap_device_scale(mdev1, dev1, f1_opp100); ++ if (ret) ++ /* handle error *. ++ ++ /* This operation will bring M2 to run at f2_opp50 w/o decreasing VDDx voltage */ ++ ret = omap_device_scale(mdev2, dev2, f2_opp50); ++ if (ret) ++ /* handle error *. +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0028-OMAP3-cpufreq-Fix-loops_per_jiffy-calculation.patch ^ |
@@ -0,0 +1,38 @@ +From 6bc167321656e95761772723148e2c81d3e97bb3 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 14 Apr 2011 11:23:55 +0300 +Subject: [PATCH 28/32] OMAP3: cpufreq: Fix loops_per_jiffy calculation + +This local loops_per_jiffy calculation is needed only for CONFIG_SMP builds +as cpufreq_notify_transition does it for !CONFIG_SMP. + +As this code doesn't compile for !CONFIG_SMP and would get wrong +loops_per_jiffy value if calculated twice, do it only for CONFIG_SMP builds. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + arch/arm/plat-omap/cpu-omap.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index d965220..ec4fde0 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -136,12 +136,14 @@ static int omap_target(struct cpufreq_policy *policy, + if (opp_find_freq_ceil(mpu_dev, &freq)) + omap_device_scale(mpu_dev, mpu_dev, freq); + ++#if defined(CONFIG_SMP) + /* Update loops per jiffy */ + freqs.new = omap_getspeed(policy->cpu); + 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 + + /* post notifiers */ + for_each_cpu(i, policy->cpus) { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0029-OMAP3-cpufreq-Fix-uninitialzed-freqs.new-variable.patch ^ |
@@ -0,0 +1,39 @@ +From 4be53d2a69418f2042f4b81743969dd96b7dfd26 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 14 Apr 2011 14:43:28 +0300 +Subject: [PATCH 29/32] OMAP3: cpufreq: Fix uninitialzed freqs.new variable + +Most likely code falls always through the (freqs.old == freqs.new) test +in function omap_target as the freqs.new is uninitialized. It seems that +freqs_notify.new setup was meant to be freqs.new as the freqs_notify is +otherwise unused in this function. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + arch/arm/plat-omap/cpu-omap.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index ec4fde0..358db96 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -91,7 +91,6 @@ static int omap_target(struct cpufreq_policy *policy, + #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) + unsigned long freq; + int i; +- struct cpufreq_freqs freqs_notify; + struct device *mpu_dev = omap2_get_mpuss_device(); + #endif + int ret = 0; +@@ -119,7 +118,7 @@ static int omap_target(struct cpufreq_policy *policy, + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); + #elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) + freqs.old = omap_getspeed(policy->cpu);; +- freqs_notify.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; ++ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; + freqs.cpu = policy->cpu; + + if (freqs.old == freqs.new) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0030-OMAP3-cpufreq-Use-dpll1_ck-clock-instead-of-arm_fck-.patch ^ |
@@ -0,0 +1,38 @@ +From 195fa6aaabb0584eac0920c55e2b691e3aa43e6b Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 14 Apr 2011 14:51:45 +0300 +Subject: [PATCH 30/32] OMAP3: cpufreq: Use dpll1_ck clock instead of arm_fck for MPU scaling + +Frequency scaling doesn't happen with arm_fck since clk_round_rate returns +always the current hw rate and thus the (freqs.old == freqs.new) test in +function omap_target is always true. Reason for this is that there is no +round_rate function defined for arm_fck clock and thus code falls back to +current rate. + +Following upstream patch changes OMAP3 cpufreq code to use dpll1_ck: +https://patchwork.kernel.org/patch/632781/ + +It seems logical change as there is round_clock function for dpll1_ck and +the arm_fck is derived from it. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + 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 358db96..98c8460 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -45,7 +45,7 @@ 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" ++#define MPU_CLK "dpll1_ck" + #else + #define MPU_CLK "virt_prcm_set" + #endif +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-dvfs-0032-rx51-add-board-OPP-init-to-disable-125MHz-from-avail.patch ^ |
@@ -0,0 +1,86 @@ +From 0da7512d793fffb915be656345568ed128b7cda8 Mon Sep 17 00:00:00 2001 +From: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> +Date: Fri, 15 Apr 2011 11:10:43 +0300 +Subject: [PATCH 32/32] rx51: add board OPP init to disable 125MHz from available cpu rates + +Using rx51 (N900) at 125 MHz causes problems with Meego UI. +Disable this rate from available frequencies. + +Signed-off-by: Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> +--- + arch/arm/mach-omap2/board-rx51.c | 45 ++++++++++++++++++++++++++++++++++++++ + 1 files changed, 45 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c +index 08e2b71..8312b40 100644 +--- a/arch/arm/mach-omap2/board-rx51.c ++++ b/arch/arm/mach-omap2/board-rx51.c +@@ -17,6 +17,7 @@ + #include <linux/io.h> + #include <linux/gpio.h> + #include <linux/leds.h> ++#include <linux/opp.h> + + #include <mach/hardware.h> + #include <asm/mach-types.h> +@@ -29,6 +30,7 @@ + #include <plat/dma.h> + #include <plat/gpmc.h> + #include <plat/usb.h> ++#include <plat/omap_device.h> + + #include "mux.h" + #include "pm.h" +@@ -112,6 +114,49 @@ static void __init rx51_init_irq(void) + omap_gpio_init(); + } + ++static void __init rx51_opp_init(void) ++{ ++ /* ++ * Init opp tables to default values and then ++ * remove 125MHz from available cpu clock rates. ++ */ ++ ++ int r = 0; ++ ++ if (r=omap3_opp_init()) { ++ /* ++ * FIXME: We are now called with late_initcall() and ++ * thus omap3_opp_init() has already been run once, ++ * so we will get -EEXIST. This check should be removed ++ * when our backport of opp/dvfs code gets updated ++ * and late_initcall removed. ++ */ ++ if (r != -EEXIST) { ++ pr_err("%s: failed to init default opp table: %d\n", __func__, r); ++ return; ++ } ++ } ++ ++ struct omap_hwmod *mpu = omap_hwmod_lookup("mpu"); ++ struct device *dev; ++ if (!mpu) { ++ pr_err("%s: omap_hwmod_lookup failed\n", __func__); ++ return; ++ } ++ dev = &mpu->od->pdev.dev; ++ r = opp_disable(dev, 125000000); ++ if (r) { ++ pr_err("%s: failed to disable opp, err: %d\n", __func__, r); ++ } ++} ++/* ++ * FIXME: using late_initcall to get this working with current backported ++ * version of opp/dvfs support. Currently rx51_opp_init will fail if run ++ * from rx51_init due to some hwmod related inits that are not yet done. ++ * Move to normal call in rx51_init when updating the backport. ++ */ ++late_initcall(rx51_opp_init); ++ + extern void __init rx51_peripherals_init(void); + + #ifdef CONFIG_OMAP_MUX +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-enabled-vdda_dac-regulator-support-tvout-on-rx51.patch ^ |
@@ -0,0 +1,62 @@ +From b850c6a65a78039a09814b2a121c6ee92b83a071 Mon Sep 17 00:00:00 2001 +From: Bhavanarayana Srikar.1 (EXT-Elektrobit/Helsinki) <ext-srikar.1.bhavanarayana@nokia.com> +Date: Thu, 25 Nov 2010 17:09:00 +0100 +Subject: [PATCH 24/42] enabled vdda_dac regulator support tvout on rx51 + +To support tvout on rx51,added the venc vdac regulator +consumer supply data and also intialised the vdac regulator +with vdac regulator consumer supply data which enables the +power supply to venc through twl4030 on rx51 + +Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com> +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 19 +++++++++++++++++-- + 1 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index e08b3b9..cc279c2 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -461,6 +461,16 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = { + REGULATOR_SUPPLY("vdd", "2-0063"), + }; + ++ ++#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) ++static struct regulator_consumer_supply rx51_vdac_supply[] = { ++ { ++ .supply = "vdda_dac", ++ .dev = &rx51_display_device.dev, ++ }, ++}; ++#endif ++ + static struct regulator_init_data rx51_vaux1 = { + .constraints = { + .name = "V28", +@@ -578,14 +588,19 @@ static struct regulator_init_data rx51_vsim = { + + 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_VOLTAGE +- | REGULATOR_CHANGE_MODE ++ .valid_ops_mask = REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, ++#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) ++ .num_consumer_supplies = 1, ++ .consumer_supplies = rx51_vdac_supply, ++#endif + }; + + static struct regulator_init_data rx51_vio = { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-et8ek8-replaces-et8ek8-Call-configure_interface-when.patch ^ |
@@ -0,0 +1,26 @@ +From fef77282b7892daab1f43d5478abfbdeb0dbb975 Mon Sep 17 00:00:00 2001 +From: Teemu Tuominen <tux@t3.fi> +Date: Mon, 23 May 2011 12:18:33 +0300 +Subject: [PATCH] et8ek8: replaces "et8ek8: Call configure_interface when configuring the format" with one liner + +Temporary patch for N900 Meego adaptation: for some currently unknown reason this works better with the +integrated ISP drivers. +--- + drivers/media/video/et8ek8.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/media/video/et8ek8.c b/drivers/media/video/et8ek8.c +index 1a55895..e38d84d 100644 +--- a/drivers/media/video/et8ek8.c ++++ b/drivers/media/video/et8ek8.c +@@ -701,6 +701,7 @@ static int et8ek8_set_pad_format(struct v4l2_subdev *subdev, + + if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) { + sensor->current_reglist = reglist; ++ et8ek8_configure(sensor); + et8ek8_update_controls(sensor); + } + +-- +1.7.3.4 + | ||
[-] [+] | Added | linux-2.6-hci_h4p-Fix-module-auto-loading.patch ^ |
@@ -0,0 +1,25 @@ +From 0960a2bb9880f0eb9b526795f8c12b5b0d1a660f Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Tue, 31 Aug 2010 17:23:54 +0300 +Subject: [PATCH 11/42] hci_h4p: Fix module auto loading + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/bluetooth/hci_h4p/core.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/bluetooth/hci_h4p/core.c b/drivers/bluetooth/hci_h4p/core.c +index 24bf02c..0f769cf 100644 +--- a/drivers/bluetooth/hci_h4p/core.c ++++ b/drivers/bluetooth/hci_h4p/core.c +@@ -1032,6 +1032,7 @@ static void __exit hci_h4p_exit(void) + module_init(hci_h4p_init); + module_exit(hci_h4p_exit); + ++MODULE_ALIAS("platform:hci_h4p"); + MODULE_DESCRIPTION("h4 driver with nokia extensions"); + MODULE_LICENSE("GPL"); + MODULE_AUTHOR("Ville Tervo"); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-input-tsc2005-Fix-mouse-device-compatibility-issue.patch ^ |
@@ -0,0 +1,38 @@ +From 8aa4d0fcf2f12114b3d4229574dad03a6462a4e4 Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Fri, 25 Feb 2011 13:53:44 +0100 +Subject: [PATCH 2/2] input: tsc2005 - Fix mouse device compatibility issue + +In case userspace uses /dev/input/mice to read touch screen events, +the movement on the screen has to be synced before sending the +touch BTN_TOUCH = 1 event. Otherwise we initiate an button action +in the old coordinates where the pressure was last released. + +This is due to the mouse interface reporting the button press and +movement in same event, and the button press is handled in X before +the movement. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + drivers/input/touchscreen/tsc2005.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c +index 2d18a53..2742ffb 100644 +--- a/drivers/input/touchscreen/tsc2005.c ++++ b/drivers/input/touchscreen/tsc2005.c +@@ -212,6 +212,11 @@ static void tsc2005_update_pen_state(struct tsc2005 *ts, + input_report_abs(ts->idev, ABS_Y, y); + input_report_abs(ts->idev, ABS_PRESSURE, pressure); + if (!ts->pen_down) { ++ /* ++ * Report movement before button press in case ++ * userspace reads mouse interface instead of evdev. ++ */ ++ input_sync(ts->idev); + input_report_key(ts->idev, BTN_TOUCH, !!pressure); + ts->pen_down = 1; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-isppreview-new-default-coeffs-for-more-ambient-indep.patch ^ |
@@ -0,0 +1,42 @@ +From b0dd0cc3ee5c452d0c58b8b759b7ba803f10a72e Mon Sep 17 00:00:00 2001 +From: Teemu Tuominen <tux@t3.fi> +Date: Mon, 21 Feb 2011 09:41:08 +0200 +Subject: [PATCH] isppreview: new default coeffs for more ambient independent quality + +--- + drivers/media/video/omap3isp/isppreview.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/drivers/media/video/omap3isp/isppreview.c b/drivers/media/video/omap3isp/isppreview.c +index aba537a..9f5bdf9 100644 +--- a/drivers/media/video/omap3isp/isppreview.c ++++ b/drivers/media/video/omap3isp/isppreview.c +@@ -37,9 +37,9 @@ + /* Default values in Office Fluorescent Light for RGBtoRGB Blending */ + static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = { + { /* RGB-RGB Matrix */ +- {0x01E2, 0x0F30, 0x0FEE}, +- {0x0F9B, 0x01AC, 0x0FB9}, +- {0x0FE0, 0x0EC0, 0x0260} ++ {0x0100, 0x0000, 0x0000}, ++ {0x0000, 0x0100, 0x0000}, ++ {0x0000, 0x0000, 0x0100} + }, /* RGB Offset */ + {0x0000, 0x0000, 0x0000} + }; +@@ -47,9 +47,9 @@ static struct omap3isp_prev_rgbtorgb flr_rgb2rgb = { + /* Default values in Office Fluorescent Light for RGB to YUV Conversion*/ + static struct omap3isp_prev_csc flr_prev_csc = { + { /* CSC Coef Matrix */ +- {66, 129, 25}, +- {-38, -75, 112}, +- {112, -94 , -18} ++ {76, 152, 28}, ++ {-44, -84, 128}, ++ {128, -98 , -20} + }, /* CSC Offset */ + {0x0, 0x0, 0x0} + }; +-- +1.7.3.4 + | ||
[-] [+] | Added | linux-2.6-mfd-Implement-twl4030-poweroff.patch ^ |
@@ -0,0 +1,101 @@ +From 771a6ed1951e2717ed724ce842aaa41b0b5e9b1c Mon Sep 17 00:00:00 2001 +From: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> +Date: Thu, 30 Sep 2010 14:59:30 +0300 +Subject: [PATCH 32/42] mfd: Implement twl4030 poweroff + +Add support for software controlled power off for TWL4030 based devices. + +[Forward ported by: Ameya Palande <ameya.palande@nokia.com] + +Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com> +Tested-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/mfd/twl4030-power.c | 55 +++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 55 insertions(+), 0 deletions(-) + +diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c +index 16422de..13daf0d 100644 +--- a/drivers/mfd/twl4030-power.c ++++ b/drivers/mfd/twl4030-power.c +@@ -33,6 +33,11 @@ + + static u8 twl4030_start_script_address = 0x2b; + ++#define STS_HW_CONDITIONS 0x0f ++#define STS_VBUS (1<<7) ++ ++#define TWL4030_WATCHDOG_CFG_REG_OFFS 0x3 ++ + #define PWR_P1_SW_EVENTS 0x10 + #define PWR_DEVOFF (1<<0) + +@@ -510,6 +515,51 @@ int twl4030_remove_script(u8 flags) + return err; + } + ++static void twl4030_poweroff(void) ++{ ++ u8 val[4]; ++ int err; ++ ++ err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &val[0], ++ STS_HW_CONDITIONS); ++ if (err) ++ pr_err("I2C error %d while reading TWL4030" ++ " PM_MASTER HW_CONDITIONS\n", err); ++ ++ if (val[0] & STS_VBUS) { ++ pr_emerg("twl4030-poweroff: VBUS on," ++ " forcing restart!\n"); ++ /* ++ * Set watchdog, Triton goes to WAIT-ON state. ++ * VBUS will cause start up ++ */ ++ twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, 1, ++ TWL4030_WATCHDOG_CFG_REG_OFFS); ++ return; ++ } ++ ++ err = twl_i2c_read(TWL4030_MODULE_PM_MASTER, &val[0], ++ PWR_P1_SW_EVENTS, 3); ++ if (err) { ++ printk(KERN_WARNING "I2C error %d while reading TWL4030" ++ "PM_MASTER P1_SW_EVENTS\n", err); ++ return; ++ } ++ ++ val[0] |= PWR_DEVOFF; ++ val[1] |= PWR_DEVOFF; ++ val[2] |= PWR_DEVOFF; ++ ++ err = twl_i2c_write(TWL4030_MODULE_PM_MASTER, val, ++ PWR_P1_SW_EVENTS, 3); ++ ++ if (err) { ++ printk(KERN_WARNING "I2C error %d while writing TWL4030" ++ "PM_MASTER P1_SW_EVENTS\n", err); ++ return ; ++ } ++} ++ + void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts) + { + int err = 0; +@@ -517,9 +567,14 @@ void __init twl4030_power_init(struct twl4030_power_data *twl4030_scripts) + struct twl4030_resconfig *resconfig; + u8 address = twl4030_start_script_address; + ++ pm_power_off = twl4030_poweroff; ++ + err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, + TWL4030_PM_MASTER_KEY_CFG1, + TWL4030_PM_MASTER_PROTECT_KEY); ++ ++ err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, R_KEY_1, ++ R_PROTECT_KEY); + if (err) + goto unlock; + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-mfd-twl4030-Driver-for-twl4030-madc-module.patch ^ |
@@ -0,0 +1,760 @@ +From 9378e612c5ea828edc9139a0345c4ae01f225c5b Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.k.ylinen@nokia.com> +Date: Fri, 9 Apr 2010 12:20:52 +0300 +Subject: [PATCH 12/42] mfd: twl4030: Driver for twl4030 madc module + +This ADC allows monitoring of analog signals such as battery levels, +temperatures, etc. + +Several people have contributed to this driver on the linux-omap list. + +Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com> +Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@nokia.com> +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/mfd/Kconfig | 21 ++ + drivers/mfd/Makefile | 3 +- + drivers/mfd/twl4030-madc.c | 549 ++++++++++++++++++++++++++++++++++++++ + include/linux/i2c/twl4030-madc.h | 126 +++++++++ + 4 files changed, 698 insertions(+), 1 deletions(-) + create mode 100644 drivers/mfd/twl4030-madc.c + create mode 100644 include/linux/i2c/twl4030-madc.h + +diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig +index 3a1493b..37f24da 100644 +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -229,6 +229,27 @@ config MFD_TC35892 + additional drivers must be enabled in order to use the + functionality of the device. + ++config TWL4030_MADC ++ tristate "TWL4030 MADC Driver" ++ depends on TWL4030_CORE ++ help ++ The TWL4030 Monitoring ADC driver enables the host ++ processor to monitor analog signals using analog-to-digital ++ conversions on the input source. TWL4030 MADC provides the ++ following features: ++ - Single 10-bit ADC with successive approximation register (SAR) conversion; ++ - Analog multiplexer for 16 inputs; ++ - Seven (of the 16) inputs are freely available; ++ - Battery voltage monitoring; ++ - Concurrent conversion request management; ++ - Interrupt signal to Primary Interrupt Handler; ++ - Averaging feature; ++ - Selective enable/disable of the averaging feature. ++ ++ Say 'y' here to statically link this module into the kernel or 'm' ++ to build it as a dinamically loadable module. The module will be ++ called twl4030-madc.ko ++ + config MFD_TMIO + bool + default n +diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile +index f54b365..da75104 100644 +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -37,9 +37,10 @@ obj-$(CONFIG_TPS6507X) += tps6507x.o + obj-$(CONFIG_MENELAUS) += menelaus.o + + obj-$(CONFIG_TWL4030_CORE) += twl-core.o twl4030-irq.o twl6030-irq.o +-obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o ++obj-$(CONFIG_TWL4030_POWER) += twl4030-power.o + obj-$(CONFIG_TWL4030_CODEC) += twl4030-codec.o + obj-$(CONFIG_TWL6030_PWM) += twl6030-pwm.o ++obj-$(CONFIG_TWL4030_MADC) += twl4030-madc.o + + obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o + +diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c +new file mode 100644 +index 0000000..657ce87 +--- /dev/null ++++ b/drivers/mfd/twl4030-madc.c +@@ -0,0 +1,549 @@ ++/* ++ * TWL4030 MADC module driver ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Mikko Ylinen <mikko.k.ylinen@nokia.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/init.h> ++#include <linux/interrupt.h> ++#include <linux/kernel.h> ++#include <linux/types.h> ++#include <linux/module.h> ++#include <linux/delay.h> ++#include <linux/fs.h> ++#include <linux/platform_device.h> ++#include <linux/miscdevice.h> ++#include <linux/i2c/twl.h> ++#include <linux/i2c/twl4030-madc.h> ++#include <linux/uaccess.h> ++#include <linux/slab.h> ++ ++#define TWL4030_MADC_PFX "twl4030-madc: " ++ ++struct twl4030_madc_data { ++ struct device *dev; ++ struct mutex lock; ++ struct work_struct ws; ++ struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS]; ++ int imr; ++ int isr; ++}; ++ ++static struct twl4030_madc_data *the_madc; ++static int twl4030_madc_set_current_generator(struct twl4030_madc_data *madc, ++ int chan, int on); ++ ++static ++const struct twl4030_madc_conversion_method twl4030_conversion_methods[] = { ++ [TWL4030_MADC_RT] = { ++ .sel = TWL4030_MADC_RTSELECT_LSB, ++ .avg = TWL4030_MADC_RTAVERAGE_LSB, ++ .rbase = TWL4030_MADC_RTCH0_LSB, ++ }, ++ [TWL4030_MADC_SW1] = { ++ .sel = TWL4030_MADC_SW1SELECT_LSB, ++ .avg = TWL4030_MADC_SW1AVERAGE_LSB, ++ .rbase = TWL4030_MADC_GPCH0_LSB, ++ .ctrl = TWL4030_MADC_CTRL_SW1, ++ }, ++ [TWL4030_MADC_SW2] = { ++ .sel = TWL4030_MADC_SW2SELECT_LSB, ++ .avg = TWL4030_MADC_SW2AVERAGE_LSB, ++ .rbase = TWL4030_MADC_GPCH0_LSB, ++ .ctrl = TWL4030_MADC_CTRL_SW2, ++ }, ++}; ++ ++static int twl4030_madc_read(struct twl4030_madc_data *madc, u8 reg) ++{ ++ int ret; ++ u8 val; ++ ++ ret = twl_i2c_read_u8(TWL4030_MODULE_MADC, &val, reg); ++ if (ret) { ++ dev_dbg(madc->dev, "unable to read register 0x%X\n", reg); ++ return ret; ++ } ++ ++ return val; ++} ++ ++static void twl4030_madc_write(struct twl4030_madc_data *madc, u8 reg, u8 val) ++{ ++ int ret; ++ ++ ret = twl_i2c_write_u8(TWL4030_MODULE_MADC, val, reg); ++ if (ret) ++ dev_err(madc->dev, "unable to write register 0x%X\n", reg); ++} ++ ++static int twl4030_madc_channel_raw_read(struct twl4030_madc_data *madc, u8 reg) ++{ ++ u8 msb, lsb; ++ ++ /* For each ADC channel, we have MSB and LSB register pair. MSB address ++ * is always LSB address+1. reg parameter is the addr of LSB register */ ++ msb = twl4030_madc_read(madc, reg + 1); ++ lsb = twl4030_madc_read(madc, reg); ++ ++ return (int)(((msb << 8) | lsb) >> 6); ++} ++ ++static int twl4030_madc_read_channels(struct twl4030_madc_data *madc, ++ u8 reg_base, u16 channels, int *buf) ++{ ++ int count = 0; ++ u8 reg, i; ++ ++ if (unlikely(!buf)) ++ return 0; ++ ++ for (i = 0; i < TWL4030_MADC_MAX_CHANNELS; i++) { ++ if (channels & (1<<i)) { ++ reg = reg_base + 2*i; ++ buf[i] = twl4030_madc_channel_raw_read(madc, reg); ++ count++; ++ } ++ } | ||
[-] [+] | Added | linux-2.6-omap-iommu-Compile-in-as-it-doesn-t-work-as-module.patch ^ |
@@ -0,0 +1,31 @@ +From 990fc2a80abf13c26be609f78568b295a3b70c05 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Mon, 31 Jan 2011 12:25:40 +0200 +Subject: [PATCH] omap: iommu: Compile in as it doesn't work as module + +If iommu is compiled as module, it may be called by e.g. Omap ISP +before iommu hw specific part has initialized the core part. +As a result, iommu tries to defer NULL pointer resulting in +OOPS. + +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + arch/arm/plat-omap/Kconfig | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig +index 92c5bb7..db3a09a 100644 +--- a/arch/arm/plat-omap/Kconfig ++++ b/arch/arm/plat-omap/Kconfig +@@ -98,7 +98,7 @@ config OMAP_MBOX_KFIFO_SIZE + module parameter). + + config OMAP_IOMMU +- tristate ++ bool + + config OMAP_IOMMU_DEBUG + tristate "Export OMAP IOMMU internals in DebugFS" +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-Add-initialization-and-platform-data-for-S.patch ^ |
@@ -0,0 +1,109 @@ +From cf6c309961982a06d010f3ec8fd46e582b09faed Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Wed, 23 Jun 2010 14:31:19 +0300 +Subject: [PATCH 16/42] omap: rx51: Add initialization and platform data for Si4713 FM transmitter + +This patch adds supplies, gpio and platform data for the the Si4713 FM +transmitter. + +[jhnikula@gmail.com: Two minor line adjustment for nokia-n900-kernel.git] + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 45 ++++++++++++++++++++++++++ + 1 files changed, 45 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 62a017e..1fe5baa 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -26,6 +26,8 @@ + #include <linux/mmc/host.h> + #include <sound/tlv320aic3x.h> + #include <linux/bluetooth/hci_h4p.h> ++#include <media/radio-si4713.h> ++#include <media/si4713.h> + + #include <plat/mcspi.h> + #include <plat/board.h> +@@ -52,6 +54,8 @@ + + #define RX51_WL1251_POWER_GPIO 87 + #define RX51_WL1251_IRQ_GPIO 42 ++#define RX51_FMTX_RESET_GPIO 163 ++#define RX51_FMTX_IRQ 53 + + #define RX51_TSC2005_RESET_GPIO 104 + #define RX51_TSC2005_IRQ_GPIO 100 +@@ -438,6 +442,8 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { + /* tlv320aic3x digital supplies */ + REGULATOR_SUPPLY("IOVDD", "2-0018"), + REGULATOR_SUPPLY("DVDD", "2-0018"), ++ /* Si4713 IO supply */ ++ REGULATOR_SUPPLY("vio", "radio-si4713"), + }; + + #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) +@@ -451,6 +457,8 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = { + .dev = &rx51_display_device.dev, + }, + #endif ++ /* Si4713 supply */ ++ REGULATOR_SUPPLY("vdd", "2-0063"), + }; + + static struct regulator_init_data rx51_vaux1 = { +@@ -594,6 +602,42 @@ static struct regulator_init_data rx51_vio = { + .consumer_supplies = rx51_vio_supplies, + }; + ++static struct si4713_platform_data rx51_si4713_i2c_data = { ++ .gpio_reset = RX51_FMTX_RESET_GPIO, ++}; ++ ++static struct i2c_board_info rx51_si4713_board_info = { ++ I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH), ++ .platform_data = &rx51_si4713_i2c_data, ++}; ++ ++static struct radio_si4713_platform_data rx51_si4713_data = { ++ .i2c_bus = 2, ++ .subdev_board_info = &rx51_si4713_board_info, ++}; ++ ++static struct platform_device rx51_si4713_dev = { ++ .name = "radio-si4713", ++ .id = -1, ++ .dev = { ++ .platform_data = &rx51_si4713_data, ++ }, ++}; ++ ++static __init void rx51_init_si4713(void) ++{ ++ int err; ++ ++ err = gpio_request(RX51_FMTX_IRQ, "si4713"); ++ if (err) { ++ printk(KERN_ERR "Cannot request gpio %d\n", RX51_FMTX_IRQ); ++ return; ++ } ++ gpio_direction_input(RX51_FMTX_IRQ); ++ rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ); ++ platform_device_register(&rx51_si4713_dev); ++} ++ + static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) + { + /* FIXME this gpio setup is just a placeholder for now */ +@@ -1121,6 +1165,7 @@ void __init rx51_peripherals_init(void) + rx51_init_wl1251(); + rx51_init_tsc2005(); + rx51_bt_init(); ++ rx51_init_si4713(); + spi_register_board_info(rx51_peripherals_spi_board_info, + ARRAY_SIZE(rx51_peripherals_spi_board_info)); + omap2_hsmmc_init(mmc); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-Add-second-instance-of-the-TLV320AIC34-cod.patch ^ |
@@ -0,0 +1,30 @@ +From ce34a58a90ffadfc538e8828ceeb1d3a81737872 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Tue, 29 Jun 2010 17:45:04 +0300 +Subject: [PATCH 19/42] omap: rx51: Add second instance of the TLV320AIC34 codec + +TLV320AIC34 integrates basically two TLV320AIC33 audio codecs. The AIC34A +is found from I2C address 0x18 and AIC34B from 0x19. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 1fe5baa..e08b3b9 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -877,6 +877,9 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { + I2C_BOARD_INFO("tlv320aic3x", 0x18), + .platform_data = &rx51_aic3x_data, + }, ++ { ++ I2C_BOARD_INFO("aic34b_dummy", 0x19), ++ }, + #if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) + { + I2C_BOARD_INFO("tsl2563", 0x29), +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-Don-t-power-up-speaker-amplifier-at-bootup.patch ^ |
@@ -0,0 +1,34 @@ +From a6e5d76226334bb299edc1e59ebcc9c4bdcd9980 Mon Sep 17 00:00:00 2001 +From: ext Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 12 May 2011 14:30:58 +0300 +Subject: [PATCH] omap: rx51: Don't power up speaker amplifier at bootup + +Speaker amplifier is accidentally powered up in early TWL gpio setup. This +causes a few mA of needless battery current consumption. Without this patch +the amplifier can be shutdown only by having one active audio playback and +shutdown cycle to speaker output. + +Thanks to Kalle Jokiniemi <kalle.jokiniemi@nokia.com> for noticing the issue. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Cc: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index e9f2cd2..9481a59 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -846,7 +846,7 @@ static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) + gpio_request(gpio + 6, "backlight_pwm"); + gpio_direction_output(gpio + 6, 0); + gpio_request(gpio + 7, "speaker_en"); +- gpio_direction_output(gpio + 7, 1); ++ gpio_direction_output(gpio + 7, 0); + + return 0; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-Platform-support-for-lis3lv02d-acceleromet.patch ^ |
@@ -0,0 +1,140 @@ +From 73129099994548c4178a46dd355b95e682147ec9 Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Thu, 17 Jun 2010 18:18:42 +0300 +Subject: [PATCH 13/42] omap: rx51: Platform support for lis3lv02d accelerometer + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 88 +++++++++++++++++++++++++- + 1 files changed, 87 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 1209134..62a017e 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -42,6 +42,7 @@ + #include <sound/tpa6130a2-plat.h> + + #include <../drivers/staging/iio/light/tsl2563.h> ++#include <linux/lis3lv02d.h> + + #include "mux.h" + #include "hsmmc.h" +@@ -59,6 +60,9 @@ + #define RX51_HCI_H4P_HOSTWU_GPIO 101 + #define RX51_HCI_H4P_BTWU_GPIO 37 + ++#define LIS302_IRQ1_GPIO 181 ++#define LIS302_IRQ2_GPIO 180 /* Not yet in use */ ++ + /* list all spi devices here */ + enum { + RX51_SPI_WL1251, +@@ -69,6 +73,77 @@ enum { + static struct wl12xx_platform_data wl1251_pdata; + static struct tsc2005_platform_data tsc2005_pdata; + ++#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) ++static int lis302_setup(void) ++{ ++ int err; ++ int irq1 = LIS302_IRQ1_GPIO; ++ int irq2 = LIS302_IRQ2_GPIO; ++ ++ /* gpio for interrupt pin 1 */ ++ err = gpio_request(irq1, "lis3lv02dl_irq1"); ++ if (err) { ++ printk(KERN_ERR "lis3lv02dl: gpio request failed\n"); ++ goto out; ++ } ++ ++ /* gpio for interrupt pin 2 */ ++ err = gpio_request(irq2, "lis3lv02dl_irq2"); ++ if (err) { ++ gpio_free(irq1); ++ printk(KERN_ERR "lis3lv02dl: gpio request failed\n"); ++ goto out; ++ } ++ ++ gpio_direction_input(irq1); ++ gpio_direction_input(irq2); ++ ++out: ++ return err; ++} ++ ++static int lis302_release(void) ++{ ++ gpio_free(LIS302_IRQ1_GPIO); ++ gpio_free(LIS302_IRQ2_GPIO); ++ ++ return 0; ++} ++ ++static struct lis3lv02d_platform_data rx51_lis3lv02d_data = { ++ .click_flags = LIS3_CLICK_SINGLE_X | LIS3_CLICK_SINGLE_Y | ++ LIS3_CLICK_SINGLE_Z, ++ /* Limits are 0.5g * value */ ++ .click_thresh_x = 8, ++ .click_thresh_y = 8, ++ .click_thresh_z = 10, ++ /* Click must be longer than time limit */ ++ .click_time_limit = 9, ++ /* Kind of debounce filter */ ++ .click_latency = 50, ++ ++ /* Limits for all axis. millig-value / 18 to get HW values */ ++ .wakeup_flags = LIS3_WAKEUP_X_HI | LIS3_WAKEUP_Y_HI, ++ .wakeup_thresh = 800 / 18, ++ .wakeup_flags2 = LIS3_WAKEUP_Z_HI , ++ .wakeup_thresh2 = 900 / 18, ++ ++ .hipass_ctrl = LIS3_HIPASS1_DISABLE | LIS3_HIPASS2_DISABLE, ++ ++ /* Interrupt line 2 for click detection, line 1 for thresholds */ ++ .irq_cfg = LIS3_IRQ2_CLICK | LIS3_IRQ1_FF_WU_12, ++ ++ .axis_x = LIS3_DEV_X, ++ .axis_y = LIS3_INV_DEV_Y, ++ .axis_z = LIS3_INV_DEV_Z, ++ .setup_resources = lis302_setup, ++ .release_resources = lis302_release, ++ .st_min_limits = {-32, 3, 3}, ++ .st_max_limits = {-3, 32, 32}, ++ .irq2 = OMAP_GPIO_IRQ(LIS302_IRQ2_GPIO), ++}; ++#endif ++ + #if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) + static struct tsl2563_platform_data rx51_tsl2563_platform_data = { + .cover_comp_gain = 16, +@@ -770,6 +845,16 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { + } + }; + ++static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_3[] = { ++#if defined(CONFIG_SENSORS_LIS3_I2C) || defined(CONFIG_SENSORS_LIS3_I2C_MODULE) ++ { ++ I2C_BOARD_INFO("lis3lv02d", 0x1d), ++ .platform_data = &rx51_lis3lv02d_data, ++ .irq = OMAP_GPIO_IRQ(LIS302_IRQ1_GPIO), ++ }, ++#endif ++}; ++ + static int __init rx51_i2c_init(void) + { + if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || +@@ -785,7 +870,8 @@ static int __init rx51_i2c_init(void) + ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); + omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, + ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); +- omap_register_i2c_bus(3, 400, NULL, 0); ++ omap_register_i2c_bus(3, 400, rx51_peripherals_i2c_board_info_3, ++ ARRAY_SIZE(rx51_peripherals_i2c_board_info_3)); + return 0; + } + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-Set-regulator-V28_A-always-on.patch ^ |
@@ -0,0 +1,34 @@ +From cae12d3ebf22039cc7216f317bebac2f797d2a31 Mon Sep 17 00:00:00 2001 +From: ext Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 12 May 2011 14:30:57 +0300 +Subject: [PATCH] omap: rx51: Set regulator V28_A always on + +The V28_A domain in Nokia N900 that supplies VDD voltages to TLV320AIC34 and +TPA6130A2 should not be shutdown. This is because otherwise there will be +leak from VIO to VDD in TLV320AIC34 and this leak consumes more battery +current that is saved from keeping V28_A off. With this patch the battery +current consumption is approximately 1.5 mA lower. + +Thanks to Kalle Jokiniemi <kalle.jokiniemi@nokia.com> for noticing the issue. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Cc: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 482fc3a..e9f2cd2 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -683,6 +683,7 @@ static struct regulator_init_data rx51_vmmc2 = { + .name = "V28_A", + .min_uV = 2800000, + .max_uV = 3000000, ++ .always_on = true, /* due VIO leak to AIC34 VDDs */ + .apply_uV = true, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-bq27x00-i2c-address.patch ^ |
@@ -0,0 +1,32 @@ +From 38b7014cd65393acf7457f023023df9851a42249 Mon Sep 17 00:00:00 2001 +From: Mika Laitio <ext-mika.1.laitio@nokia.com> +Date: Mon, 28 Mar 2011 11:51:04 +0300 +Subject: rx51: bq27x00 i2c board info for N900 + +Add bq27x00 i2c board info for N900 when the module is enabled on +build. + +Signed-off-by: Mika Laitio <ext-mika.1.laitio@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 2252f87..6eb7f63 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -1007,6 +1007,11 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { + .platform_data = &rx51_lp5523_platform_data, + }, + #endif ++#if defined(CONFIG_BATTERY_BQ27X00_I2C) || defined(CONFIG_BATTERY_BQ27X00_I2C_MODULE) ++ { ++ I2C_BOARD_INFO("bq27200", 0x55), ++ }, ++#endif + { + I2C_BOARD_INFO("tpa6130a2", 0x60), + .platform_data = &rx51_tpa6130a2_data, +-- +1.7.1 + | ||
[-] [+] | Added | linux-2.6-omap-rx51-mark-reserved-memory-earlier.patch ^ |
@@ -0,0 +1,43 @@ +From 9eb715379cf844933541266962a2c547dcad2900 Mon Sep 17 00:00:00 2001 +From: Felipe Contreras <felipe.contreras@gmail.com> +Date: Fri, 15 Oct 2010 14:46:24 +0200 +Subject: [PATCH 2/3] omap: rx51: mark reserved memory earlier + +So that omap_vram_set_sdram_vram() is called before +omap_vram_reserve_sdram_memblock(). + +Signed-off-by: Felipe Contreras <felipe.contreras <at> gmail.com> +--- + arch/arm/mach-omap2/board-rx51.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c +index 08e2b71..b14e4d6 100644 +--- a/arch/arm/mach-omap2/board-rx51.c ++++ b/arch/arm/mach-omap2/board-rx51.c +@@ -146,15 +146,20 @@ static void __init rx51_init(void) + static void __init rx51_map_io(void) + { + omap2_set_globals_3xxx(); +- rx51_video_mem_init(); + omap34xx_map_common_io(); + } + ++static void __init rx51_reserve(void) ++{ ++ rx51_video_mem_init(); ++ omap_reserve(); ++} ++ + MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") + /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ + .boot_params = 0x80000100, + .map_io = rx51_map_io, +- .reserve = omap_reserve, ++ .reserve = rx51_reserve, + .init_irq = rx51_init_irq, + .init_machine = rx51_init, + .timer = &omap_timer, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap3-iovmm-Support-non-page-aligned-buffers-in-iomm.patch ^ |
@@ -0,0 +1,99 @@ +From 99b7439a2889bb12a11b628836ccf02d66e06ee1 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Date: Mon, 30 May 2011 14:47:09 +0200 +Subject: [PATCH] omap3: iovmm: Support non page-aligned buffers in iommu_vmap + +The IOMMU virtual memory mapping API requires page-aligned buffers. +There's no hardware reason behind such a restriction. Remove it by +rounding the address of the first page entry down, and adding the offset +back to the IOMMU virtual address. + +Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/plat-omap/iovmm.c | 32 ++++++++++++++++++++++++-------- + 1 files changed, 24 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index b82cef4..fa5ae98 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -60,6 +60,15 @@ + + static struct kmem_cache *iovm_area_cachep; + ++/* return the offset of the first scatterlist entry in a sg table */ ++static unsigned int sgtable_offset(const struct sg_table *sgt) ++{ ++ if (!sgt || !sgt->nents) ++ return 0; ++ ++ return sgt->sgl->offset; ++} ++ + /* return total bytes of sg buffers */ + static size_t sgtable_len(const struct sg_table *sgt) + { +@@ -72,11 +81,17 @@ static size_t sgtable_len(const struct sg_table *sgt) + for_each_sg(sgt->sgl, sg, sgt->nents, i) { + size_t bytes; + +- bytes = sg_dma_len(sg); ++ bytes = sg_dma_len(sg) + sg->offset; + + if (!iopgsz_ok(bytes)) { +- pr_err("%s: sg[%d] not iommu pagesize(%x)\n", +- __func__, i, bytes); ++ pr_err("%s: sg[%d] not iommu pagesize(%u %u)\n", ++ __func__, i, bytes, sg->offset); ++ return 0; ++ } ++ ++ if (i && sg->offset) { ++ pr_err("%s: sg[%d] offset not allowed in internal " ++ "entries\n", __func__, i); + return 0; + } + +@@ -207,8 +222,8 @@ static void *vmap_sg(const struct sg_table *sgt) + u32 pa; + int err; + +- pa = sg_phys(sg); +- bytes = sg_dma_len(sg); ++ pa = sg_phys(sg) - sg->offset; ++ bytes = sg_dma_len(sg) + sg->offset; + + BUG_ON(bytes != PAGE_SIZE); + +@@ -485,8 +500,8 @@ static int map_iovm_area(struct iommu *obj, struct iovm_struct *new, + size_t bytes; + struct iotlb_entry e; + +- pa = sg_phys(sg); +- bytes = sg_dma_len(sg); ++ pa = sg_phys(sg) - sg->offset; ++ bytes = sg_dma_len(sg) + sg->offset; + + flags &= ~IOVMF_PGSZ_MASK; + pgsz = bytes_to_iopgsz(bytes); +@@ -666,7 +681,7 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, + if (IS_ERR_VALUE(da)) + vunmap_sg(va); + +- return da; ++ return da + sgtable_offset(sgt); + } + EXPORT_SYMBOL_GPL(iommu_vmap); + +@@ -685,6 +700,7 @@ struct sg_table *iommu_vunmap(struct iommu *obj, u32 da) + * 'sgt' is allocated before 'iommu_vmalloc()' is called. + * Just returns 'sgt' to the caller to free + */ ++ da &= PAGE_MASK; + sgt = unmap_vm_area(obj, da, vunmap_sg, IOVMF_DISCONT | IOVMF_MMIO); + if (!sgt) + dev_dbg(obj->dev, "%s: No sgt\n", __func__); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap3-iovmm-Work-around-sg_alloc_table-size-limitati.patch ^ |
@@ -0,0 +1,64 @@ +From 066fdf53557c4d3b62c7ef66667cc1966e0cceeb Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Date: Mon, 30 May 2011 14:47:08 +0200 +Subject: [PATCH] omap3: iovmm: Work around sg_alloc_table size limitation in IOMMU + +sg_alloc_table can only allocate multi-page scatter-gather list tables +if the architecture supports scatter-gather lists chaining. ARM doesn't +fit in that category. + +The IOMMU driver abuses the sg table structure only to hold page +addresses without ever passing the table to the device. + +Use __sg_alloc_table instead of sg_alloc_table and allocate all entries +in one go. This avoids hitting a BUG_ON in __sg_alloc_table while still +not faking sg list chaining support. + +Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/plat-omap/iovmm.c | 14 ++++++++++++-- + 1 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index 51ef43e..b82cef4 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -121,6 +121,16 @@ static unsigned sgtable_nents(size_t bytes, u32 da, u32 pa) + return nr_entries; + } + ++static struct scatterlist *sg_alloc(unsigned int nents, gfp_t gfp_mask) ++{ ++ return kmalloc(nents * sizeof(struct scatterlist), gfp_mask); ++} ++ ++static void sg_free(struct scatterlist *sg, unsigned int nents) ++{ ++ kfree(sg); ++} ++ + /* allocate and initialize sg_table header(a kind of 'superblock') */ + static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags, + u32 da, u32 pa) +@@ -146,7 +156,7 @@ static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags, + if (!sgt) + return ERR_PTR(-ENOMEM); + +- err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL); ++ err = __sg_alloc_table(sgt, nr_entries, -1, GFP_KERNEL, sg_alloc); + if (err) { + kfree(sgt); + return ERR_PTR(err); +@@ -163,7 +173,7 @@ static void sgtable_free(struct sg_table *sgt) + if (!sgt) + return; + +- sg_free_table(sgt); ++ __sg_free_table(sgt, -1, sg_free); + kfree(sgt); + + pr_debug("%s: sgt:%p\n", __func__, sgt); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-omap3-rx51-Platform-support-for-lp5523-led-chip.patch ^ |
@@ -0,0 +1,132 @@ +From 7fb972d0e854e9547a23f24b8b683da22e1171c7 Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Wed, 18 Aug 2010 17:50:23 +0300 +Subject: [PATCH 28/42] omap3: rx51: Platform support for lp5523 led chip + +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 83 +++++++++++++++++++++++++- + 1 files changed, 82 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index cc279c2..d528848 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -42,6 +42,7 @@ + + #include <sound/tlv320aic3x.h> + #include <sound/tpa6130a2-plat.h> ++#include <linux/leds-lp5523.h> + + #include <../drivers/staging/iio/light/tsl2563.h> + #include <linux/lis3lv02d.h> +@@ -67,6 +68,8 @@ + #define LIS302_IRQ1_GPIO 181 + #define LIS302_IRQ2_GPIO 180 /* Not yet in use */ + ++#define RX51_LP5523_CHIP_EN_GPIO 41 ++ + /* list all spi devices here */ + enum { + RX51_SPI_WL1251, +@@ -154,6 +157,79 @@ static struct tsl2563_platform_data rx51_tsl2563_platform_data = { + }; + #endif + ++#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE) ++static struct lp5523_led_config rx51_lp5523_led_config[] = { ++ { ++ .chan_nr = 0, ++ .led_current = 50, ++ }, { ++ .chan_nr = 1, ++ .led_current = 50, ++ }, { ++ .chan_nr = 2, ++ .led_current = 50, ++ }, { ++ .chan_nr = 3, ++ .led_current = 50, ++ }, { ++ .chan_nr = 4, ++ .led_current = 50, ++ }, { ++ .chan_nr = 5, ++ .led_current = 50, ++ }, { ++ .chan_nr = 6, ++ .led_current = 50, ++ }, { ++ .chan_nr = 7, ++ .led_current = 50, ++ }, { ++ .chan_nr = 8, ++ .led_current = 50, ++ } ++}; ++ ++static int rx51_lp5523_setup(void) ++{ ++ int err; ++ ++ err = gpio_request(RX51_LP5523_CHIP_EN_GPIO, "lp5523_enable"); ++ if (err < 0) { ++ pr_err("Unable to get lp5523_enable GPIO\n"); ++ return err; ++ } ++ ++ err = gpio_direction_output(RX51_LP5523_CHIP_EN_GPIO, 1); ++ if (err < 0) { ++ pr_err("Failed to change direction for %d GPIO\n", ++ RX51_LP5523_CHIP_EN_GPIO); ++ } ++ return err; ++} ++ ++static void rx51_lp5523_release(void) ++{ ++ gpio_free(RX51_LP5523_CHIP_EN_GPIO); ++} ++ ++static void rx51_lp5523_enable(bool state) ++{ ++ if (state) ++ gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, 1); ++ else ++ gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, 0); ++} ++ ++static struct lp5523_platform_data rx51_lp5523_platform_data = { ++ .led_config = rx51_lp5523_led_config, ++ .num_channels = ARRAY_SIZE(rx51_lp5523_led_config), ++ .clock_mode = LP5523_CLOCK_AUTO, ++ .setup_resources = rx51_lp5523_setup, ++ .release_resources = rx51_lp5523_release, ++ .enable = rx51_lp5523_enable, ++}; ++#endif ++ + static struct omap2_mcspi_device_config wl1251_mcspi_config = { + .turbo_mode = 0, + .single_channel = 1, +@@ -901,6 +977,12 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { + .platform_data = &rx51_tsl2563_platform_data, + }, + #endif ++#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE) ++ { ++ I2C_BOARD_INFO("lp5523", 0x32), ++ .platform_data = &rx51_lp5523_platform_data, ++ }, ++#endif + { + I2C_BOARD_INFO("tpa6130a2", 0x60), + .platform_data = &rx51_tpa6130a2_data, +@@ -1189,4 +1271,3 @@ void __init rx51_peripherals_init(void) + omap2_hsmmc_init(mmc); + platform_device_register(&rx51_charger_device); + } +- +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-opp-0015-omap-opp-add-OMAP3-OPP-table-data-and-common-init.patch ^ |
@@ -0,0 +1,403 @@ +From a3713c199f0d54da5eff3a1b5a39842e305df912 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon <nm@ti.com> +Date: Thu, 9 Dec 2010 09:13:46 -0600 +Subject: [PATCH 15/32] omap: opp: add OMAP3 OPP table data and common init + +Add OPP data for OMAP34xx and OMAP36xx and initialization functions +to populate OPP tables based on current SoC. +introduce an OMAP generic opp initialization routine which OMAP3 +and OMAP4+ SoCs can use to register their OPP definitions. + +Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +Signed-off-by: Nishanth Menon <nm@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + Documentation/arm/OMAP/omap_pm | 25 ++++++++ + arch/arm/mach-omap2/Kconfig | 2 + + arch/arm/mach-omap2/Makefile | 6 ++ + arch/arm/mach-omap2/omap_opp_data.h | 72 +++++++++++++++++++++++ + arch/arm/mach-omap2/opp.c | 93 ++++++++++++++++++++++++++++++ + arch/arm/mach-omap2/opp3xxx_data.c | 107 +++++++++++++++++++++++++++++++++++ + arch/arm/mach-omap2/pm.h | 9 +++ + 7 files changed, 314 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/omap_opp_data.h + create mode 100644 arch/arm/mach-omap2/opp.c + create mode 100644 arch/arm/mach-omap2/opp3xxx_data.c + +diff --git a/Documentation/arm/OMAP/omap_pm b/Documentation/arm/OMAP/omap_pm +index 5389440..9012bb0 100644 +--- a/Documentation/arm/OMAP/omap_pm ++++ b/Documentation/arm/OMAP/omap_pm +@@ -127,3 +127,28 @@ implementation needs: + 10. (*pdata->cpu_set_freq)(unsigned long f) + + 11. (*pdata->cpu_get_freq)(void) ++ ++Customizing OPP for platform ++============================ ++Defining CONFIG_PM should enable OPP layer for the silicon ++and the registration of OPP table should take place automatically. ++However, in special cases, the default OPP table may need to be ++tweaked, for e.g.: ++ * enable default OPPs which are disabled by default, but which ++ could be enabled on a platform ++ * Disable an unsupported OPP on the platform ++ * Define and add a custom opp table entry ++in these cases, the board file needs to do additional steps as follows: ++arch/arm/mach-omapx/board-xyz.c ++ #include "pm.h" ++ .... ++ static void __init omap_xyz_init_irq(void) ++ { ++ .... ++ /* Initialize the default table */ ++ omapx_opp_init(); ++ /* Do customization to the defaults */ ++ .... ++ } ++NOTE: omapx_opp_init will be omap3_opp_init or as required ++based on the omap family. +diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig +index ecba232..ac21a4f 100644 +--- a/arch/arm/mach-omap2/Kconfig ++++ b/arch/arm/mach-omap2/Kconfig +@@ -35,6 +35,8 @@ config ARCH_OMAP3 + select CPU_V7 + select USB_ARCH_HAS_EHCI + select ARM_L1_CACHE_SHIFT_6 if !ARCH_OMAP4 ++ select ARCH_HAS_OPP ++ select PM_OPP if PM + + config ARCH_OMAP4 + bool "TI OMAP4" +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index ac0607c..5eb879e 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -49,6 +49,12 @@ obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o + obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o + # obj-$(CONFIG_ARCH_OMAP3) += sdrc3xxx.o + ++# OPP table initialization ++ifeq ($(CONFIG_PM_OPP),y) ++obj-y += opp.o ++obj-$(CONFIG_ARCH_OMAP3) += opp3xxx_data.o ++endif ++ + # Power Management + ifeq ($(CONFIG_PM),y) + obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o +diff --git a/arch/arm/mach-omap2/omap_opp_data.h b/arch/arm/mach-omap2/omap_opp_data.h +new file mode 100644 +index 0000000..46ac27d +--- /dev/null ++++ b/arch/arm/mach-omap2/omap_opp_data.h +@@ -0,0 +1,72 @@ ++/* ++ * OMAP SoC specific OPP Data helpers ++ * ++ * Copyright (C) 2009-2010 Texas Instruments Incorporated - http://www.ti.com/ ++ * Nishanth Menon ++ * Kevin Hilman ++ * Copyright (C) 2010 Nokia Corporation. ++ * Eduardo Valentin ++ * ++ * 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 "as is" WITHOUT ANY WARRANTY of any ++ * kind, whether express or implied; without even the implied warranty ++ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++#ifndef __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H ++#define __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H ++ ++#include <plat/omap_hwmod.h> ++ ++/* ++ * *BIG FAT WARNING*: ++ * USE the following ONLY in opp data initialization common to an SoC. ++ * DO NOT USE these in board files/pm core etc. ++ */ ++ ++/** ++ * struct omap_opp_def - OMAP OPP Definition ++ * @hwmod_name: Name of the hwmod for this domain ++ * @freq: Frequency in hertz corresponding to this OPP ++ * @u_volt: Nominal voltage in microvolts corresponding to this OPP ++ * @default_available: True/false - is this OPP available by default ++ * ++ * OMAP SOCs have a standard set of tuples consisting of frequency and voltage ++ * pairs that the device will support per voltage domain. This is called ++ * Operating Points or OPP. The actual definitions of OMAP Operating Points ++ * varies over silicon within the same family of devices. For a specific ++ * domain, you can have a set of {frequency, voltage} pairs and this is denoted ++ * by an array of omap_opp_def. As the kernel boots and more information is ++ * available, a set of these are activated based on the precise nature of ++ * device the kernel boots up on. It is interesting to remember that each IP ++ * which belongs to a voltage domain may define their own set of OPPs on top ++ * of this - but this is handled by the appropriate driver. ++ */ ++struct omap_opp_def { ++ char *hwmod_name; ++ ++ unsigned long freq; ++ unsigned long u_volt; ++ ++ bool default_available; ++}; ++ ++/* ++ * Initialization wrapper used to define an OPP for OMAP variants. ++ */ ++#define OPP_INITIALIZER(_hwmod_name, _enabled, _freq, _uv) \ ++{ \ ++ .hwmod_name = _hwmod_name, \ ++ .default_available = _enabled, \ ++ .freq = _freq, \ ++ .u_volt = _uv, \ ++} ++ ++/* Use this to initialize the default table */ ++extern int __init omap_init_opp_table(struct omap_opp_def *opp_def, ++ u32 opp_def_size); ++ ++#endif /* __ARCH_ARM_MACH_OMAP2_OMAP_OPP_DATA_H */ +diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c +new file mode 100644 +index 0000000..ab8b35b +--- /dev/null ++++ b/arch/arm/mach-omap2/opp.c +@@ -0,0 +1,93 @@ ++/* ++ * OMAP SoC specific OPP wrapper function ++ * ++ * Copyright (C) 2009-2010 Texas Instruments Incorporated - http://www.ti.com/ ++ * Nishanth Menon ++ * Kevin Hilman ++ * Copyright (C) 2010 Nokia Corporation. ++ * Eduardo Valentin ++ * ++ * 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 "as is" WITHOUT ANY WARRANTY of any ++ * kind, whether express or implied; without even the implied warranty ++ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++#include <linux/module.h> ++#include <linux/opp.h> ++ ++#include <plat/omap_device.h> ++ ++#include "omap_opp_data.h" ++ | ||
[-] [+] | Added | linux-2.6-opp-0016-OMAP3-4-OPP-make-omapx_opp_init-non-static.patch ^ |
@@ -0,0 +1,47 @@ +From ba09e2a547eed133c8351fa2261925232cb4f385 Mon Sep 17 00:00:00 2001 +From: Menon, Nishanth <nm@ti.com> +Date: Wed, 5 Jan 2011 20:49:35 +0000 +Subject: [PATCH 16/32] OMAP3|4: OPP: make omapx_opp_init non-static + +OMAP3|4: OPP: make omapx_opp_init non-static + +omap3 and omap4 opp_init should be made non-static to allow +for platform specific opp table tweaking. making these static +conflicts with the definition in pm.h(global) as well. +we include pm.h as well to ensure that there are no such prototype +conflicts with actual implementation in the future. + +Signed-off-by: Nishanth Menon <nm@ti.com> +Signed-off-by: Kevin Hilman <khilman@ti.com> + +[Kimmo Jukarainen <ext-kimmo.jukarainen@nokia.com> +Dropped patch for opp4xxx_data.c as the file does not exist +in our backported tree.] +--- + arch/arm/mach-omap2/opp3xxx_data.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c +index 0486fce..fd3a1af 100644 +--- a/arch/arm/mach-omap2/opp3xxx_data.c ++++ b/arch/arm/mach-omap2/opp3xxx_data.c +@@ -21,6 +21,7 @@ + #include <plat/cpu.h> + + #include "omap_opp_data.h" ++#include "pm.h" + + static struct omap_opp_def __initdata omap34xx_opp_def_list[] = { + /* MPU OPP1 */ +@@ -88,7 +89,7 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = { + /** + * omap3_opp_init() - initialize omap3 opp table + */ +-static int __init omap3_opp_init(void) ++int __init omap3_opp_init(void) + { + int r = -ENODEV; + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-power_supply-isp1704-patches.patch ^ |
@@ -0,0 +1,309 @@ +From ab384b3e1b9c9c658562d667d043312e648d8208 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Thu, 27 Jan 2011 14:59:27 +0200 +Subject: [PATCH 35/42] power_supply: isp1704: patches + +Consists of the following patches: + +3a3257953e4d7e99daaf048bf22df72ae8162c31 power_supply: isp1704: Detect charger after probe +7f9be9b2a652c354ab84f4f19d5d1e810bd1ab2b power_supply: isp1704: Set isp->dev before anything needs it +8f1a3ddeb800f7efeea21a199439b454224e591a power_supply: isp1704: Detect HUB/Host chargers +fcdc527f25d40f02544d98c95fbe8e609b91ae61 power_supply: isp1704: correct length for storing model + +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + drivers/power/isp1704_charger.c | 200 +++++++++++++++++++++++++++++++-------- + 1 files changed, 160 insertions(+), 40 deletions(-) + +diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c +index bc88c5c..441e8cc 100644 +--- a/drivers/power/isp1704_charger.c ++++ b/drivers/power/isp1704_charger.c +@@ -59,11 +59,61 @@ struct isp1704_charger { + struct notifier_block nb; + struct work_struct work; + +- char model[7]; ++ /* properties */ ++ char model[8]; + unsigned present:1; ++ unsigned online:1; ++ unsigned current_max; ++ ++ /* temp storage variables */ ++ unsigned long event; ++ unsigned max_power; + }; + + /* ++ * Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB ++ * chargers). ++ * ++ * REVISIT: The method is defined in Battery Charging Specification and is ++ * applicable to any ULPI transceiver. Nothing isp170x specific here. ++ */ ++static inline int isp1704_charger_type(struct isp1704_charger *isp) ++{ ++ u8 reg; ++ u8 func_ctrl; ++ u8 otg_ctrl; ++ int type = POWER_SUPPLY_TYPE_USB_DCP; ++ ++ func_ctrl = otg_io_read(isp->otg, ULPI_FUNC_CTRL); ++ otg_ctrl = otg_io_read(isp->otg, ULPI_OTG_CTRL); ++ ++ /* disable pulldowns */ ++ reg = ULPI_OTG_CTRL_DM_PULLDOWN | ULPI_OTG_CTRL_DP_PULLDOWN; ++ otg_io_write(isp->otg, ULPI_CLR(ULPI_OTG_CTRL), reg); ++ ++ /* full speed */ ++ otg_io_write(isp->otg, ULPI_CLR(ULPI_FUNC_CTRL), ++ ULPI_FUNC_CTRL_XCVRSEL_MASK); ++ otg_io_write(isp->otg, ULPI_SET(ULPI_FUNC_CTRL), ++ ULPI_FUNC_CTRL_FULL_SPEED); ++ ++ /* Enable strong pull-up on DP (1.5K) and reset */ ++ reg = ULPI_FUNC_CTRL_TERMSELECT | ULPI_FUNC_CTRL_RESET; ++ otg_io_write(isp->otg, ULPI_SET(ULPI_FUNC_CTRL), reg); ++ usleep_range(1000, 2000); ++ ++ reg = otg_io_read(isp->otg, ULPI_DEBUG); ++ if ((reg & 3) != 3) ++ type = POWER_SUPPLY_TYPE_USB_CDP; ++ ++ /* recover original state */ ++ otg_io_write(isp->otg, ULPI_FUNC_CTRL, func_ctrl); ++ otg_io_write(isp->otg, ULPI_OTG_CTRL, otg_ctrl); ++ ++ return type; ++} ++ ++/* + * ISP1704 detects PS/2 adapters as charger. To make sure the detected charger + * is actually a dedicated charger, the following steps need to be taken. + */ +@@ -127,16 +177,19 @@ static inline int isp1704_charger_verify(struct isp1704_charger *isp) + static inline int isp1704_charger_detect(struct isp1704_charger *isp) + { + unsigned long timeout; +- u8 r; ++ u8 pwr_ctrl; + int ret = 0; + ++ pwr_ctrl = otg_io_read(isp->otg, ISP1704_PWR_CTRL); ++ + /* set SW control bit in PWR_CTRL register */ + otg_io_write(isp->otg, ISP1704_PWR_CTRL, + ISP1704_PWR_CTRL_SWCTRL); + + /* enable manual charger detection */ +- r = (ISP1704_PWR_CTRL_SWCTRL | ISP1704_PWR_CTRL_DPVSRC_EN); +- otg_io_write(isp->otg, ULPI_SET(ISP1704_PWR_CTRL), r); ++ otg_io_write(isp->otg, ULPI_SET(ISP1704_PWR_CTRL), ++ ISP1704_PWR_CTRL_SWCTRL ++ | ISP1704_PWR_CTRL_DPVSRC_EN); + usleep_range(1000, 2000); + + timeout = jiffies + msecs_to_jiffies(300); +@@ -147,7 +200,10 @@ static inline int isp1704_charger_detect(struct isp1704_charger *isp) + ret = isp1704_charger_verify(isp); + break; + } +- } while (!time_after(jiffies, timeout)); ++ } while (!time_after(jiffies, timeout) && isp->online); ++ ++ /* recover original state */ ++ otg_io_write(isp->otg, ISP1704_PWR_CTRL, pwr_ctrl); + + return ret; + } +@@ -155,52 +211,91 @@ static inline int isp1704_charger_detect(struct isp1704_charger *isp) + static void isp1704_charger_work(struct work_struct *data) + { + int detect; ++ unsigned long event; ++ unsigned power; + struct isp1704_charger *isp = + container_of(data, struct isp1704_charger, work); ++ static DEFINE_MUTEX(lock); ++ event = isp->event; ++ power = isp->max_power; + +- /* +- * FIXME Only supporting dedicated chargers even though isp1704 can +- * detect HUB and HOST chargers. If the device has already been +- * enumerated, the detection will break the connection. +- */ +- if (isp->otg->state != OTG_STATE_B_IDLE) +- return; ++ mutex_lock(&lock); + +- /* disable data pullups */ +- if (isp->otg->gadget) +- usb_gadget_disconnect(isp->otg->gadget); ++ switch (event) { ++ case USB_EVENT_VBUS: ++ isp->online = true; ++ ++ /* detect charger */ ++ detect = isp1704_charger_detect(isp); ++ ++ if (detect) { ++ isp->present = detect; ++ isp->psy.type = isp1704_charger_type(isp); ++ } + +- /* detect charger */ +- detect = isp1704_charger_detect(isp); +- if (detect) { +- isp->present = detect; +- power_supply_changed(&isp->psy); ++ switch (isp->psy.type) { ++ case POWER_SUPPLY_TYPE_USB_DCP: ++ isp->current_max = 1800; ++ break; ++ case POWER_SUPPLY_TYPE_USB_CDP: ++ /* ++ * Only 500mA here or high speed chirp ++ * handshaking may break ++ */ ++ isp->current_max = 500; ++ /* FALLTHROUGH */ ++ case POWER_SUPPLY_TYPE_USB: ++ default: ++ /* enable data pullups */ ++ if (isp->otg->gadget) ++ usb_gadget_connect(isp->otg->gadget); ++ } ++ break; ++ case USB_EVENT_NONE: ++ isp->online = false; ++ isp->current_max = 0; ++ isp->present = 0; ++ isp->current_max = 0; ++ isp->psy.type = POWER_SUPPLY_TYPE_USB; ++ ++ /* ++ * Disable data pullups. We need to prevent the controller from ++ * enumerating. ++ * ++ * FIXME: This is here to allow charger detection with Host/HUB ++ * chargers. The pullups may be enabled elsewhere, so this can ++ * not be the final solution. ++ */ ++ if (isp->otg->gadget) ++ usb_gadget_disconnect(isp->otg->gadget); ++ break; ++ case USB_EVENT_ENUMERATED: ++ if (isp->present) ++ isp->current_max = 1800; | ||
[-] [+] | Added | linux-2.6-rtc-twl-Switch-to-using-threaded-irq.patch ^ |
@@ -0,0 +1,29 @@ +From e1a09e2aca70c2dc6f39734301da651a0b6b0500 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Wed, 16 Mar 2011 16:37:33 +0200 +Subject: [PATCH] rtc-twl: Switch to using threaded irq + +The driver is accessing to i2c bus in interrupt handler. Therefore, +it should use threaded irq handler. + +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + drivers/rtc/rtc-twl.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c +index ed1b868..2715b96 100644 +--- a/drivers/rtc/rtc-twl.c ++++ b/drivers/rtc/rtc-twl.c +@@ -475,7 +475,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) + if (ret < 0) + goto out1; + +- ret = request_irq(irq, twl_rtc_interrupt, ++ ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, + IRQF_TRIGGER_RISING, + dev_name(&rtc->dev), rtc); + if (ret < 0) { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-rx51-don-t-build-broken-smia-sensor-driver.patch ^ |
@@ -0,0 +1,26 @@ +From c0176319dd601bcd95d302d1f4c5b0b51f5c4008 Mon Sep 17 00:00:00 2001 +From: Teemu Tuominen <tux@t3.fi> +Date: Thu, 22 Sep 2011 13:04:27 +0300 +Subject: [PATCH] rx51: don't build broken smia-sensor driver by default + +Signed-off-by: Teemu Tuominen <tux@t3.fi> +--- + arch/arm/mach-omap2/Kconfig | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig +index ac21a4f..771e570 100644 +--- a/arch/arm/mach-omap2/Kconfig ++++ b/arch/arm/mach-omap2/Kconfig +@@ -220,7 +220,7 @@ config MACH_NOKIA_RX51 + select VIDEO_ET8EK8 if VIDEO_OMAP3 && VIDEO_HELPER_CHIPS_AUTO + select VIDEO_AD5820 if VIDEO_OMAP3 && VIDEO_HELPER_CHIPS_AUTO + select VIDEO_ADP1653 if VIDEO_OMAP3 && VIDEO_HELPER_CHIPS_AUTO +- select VIDEO_SMIA_SENSOR if VIDEO_OMAP3 && VIDEO_HELPER_CHIPS_AUTO ++# select VIDEO_SMIA_SENSOR if VIDEO_OMAP3 && VIDEO_HELPER_CHIPS_AUTO + + config MACH_OMAP_ZOOM2 + bool "OMAP3 Zoom2 board" +-- +1.7.3.4 + | ||
[-] [+] | Added | linux-2.6-tsc2005-responsibility-improvements.patch ^ |
@@ -0,0 +1,230 @@ +From db1e76d88cc94a49b78bafbe27220f77b3f1d7b0 Mon Sep 17 00:00:00 2001 +From: Mika Laitio <ext-mika.1.laitio@nokia.com> +Date: Wed, 18 May 2011 12:18:30 +0300 +Subject: [PATCH] tsc2005 responsibility improvements + +Improvements for ts driver to touch responsibility. (BMC#14989) +- ported the rect-area filtering code from the maemo kernel +- ported the touchscreen pressure and fudge area changes from + nitroid kernel. + (https://gitorious.org/android-n900/nitdroid-kernel/commit/158b91fd3a818e8a5cabb85f0b190ba9dab50ae9) + +Signed-off-by: Mika Laitio <ext-mika.1.laitio@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 4 +- + drivers/input/touchscreen/tsc2005.c | 114 ++++++++++++++++++++------ + 2 files changed, 89 insertions(+), 29 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 9481a59..d7259a9 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -1213,8 +1213,8 @@ static struct tsc2005_platform_data tsc2005_pdata = { + .ts_x_max = 4096, + .ts_x_fudge = 4, + .ts_y_max = 4096, +- .ts_y_fudge = 7, +- .ts_x_plate_ohm = 280, ++ .ts_y_fudge = 4, ++ .ts_x_plate_ohm = 320, + .esd_timeout_ms = 8000, + }; + +diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c +index 2742ffb..b2af088 100644 +--- a/drivers/input/touchscreen/tsc2005.c ++++ b/drivers/input/touchscreen/tsc2005.c +@@ -101,6 +101,7 @@ + #define MAX_12BIT 0xfff + #define TSC2005_SPI_MAX_SPEED_HZ 10000000 + #define TSC2005_PENUP_TIME_MS 40 ++#define TS_SAMPLES 4 + + struct tsc2005_spi_rd { + struct spi_transfer spi_xfer; +@@ -122,12 +123,29 @@ struct tsc2005 { + + struct mutex mutex; + ++ /* previously reported x,y,p (if pen_down) */ ++ int out_x; ++ int out_y; ++ int out_p; ++ ++ /* fudge parameters - changes must exceed one of these. */ ++ int fudge_x; ++ int fudge_y; ++ int fudge_p; ++ + /* raw copy of previous x,y,z */ + int in_x; + int in_y; + int in_z1; + int in_z2; + ++ /* average accumulators for each component */ ++ int sample_cnt; ++ int avg_x; ++ int avg_y; ++ int avg_z1; ++ int avg_z2; ++ + struct timer_list penup_timer; + struct work_struct penup_work; + +@@ -136,7 +154,10 @@ struct tsc2005 { + struct work_struct esd_work; + + unsigned int x_plate_ohm; ++ int p_max; ++ int ts_pressure; + ++ unsigned int sample_sent; + bool disabled; + unsigned int disable_depth; + unsigned int pen_down; +@@ -246,7 +267,7 @@ static irqreturn_t tsc2005_irq_handler(int irq, void *dev_id) + static irqreturn_t tsc2005_irq_thread(int irq, void *_ts) + { + struct tsc2005 *ts = _ts; +- unsigned int pressure; ++ unsigned int pressure, pressure_limit, inside_rect; + u32 x; + u32 y; + u32 z1; +@@ -290,25 +311,66 @@ static irqreturn_t tsc2005_irq_thread(int irq, void *_ts) + ts->in_z1 = z1; + ts->in_z2 = z2; + +- /* compute touch pressure resistance using equation #1 */ +- pressure = x * (z2 - z1) / z1; +- pressure = pressure * ts->x_plate_ohm / 4096; +- if (unlikely(pressure > MAX_12BIT)) +- goto out; ++ /* don't run average on the "pen down" event */ ++ if (ts->sample_sent) { ++ ts->avg_x += x; ++ ts->avg_y += y; ++ ts->avg_z1 += z1; ++ ts->avg_z2 += z2; + +- tsc2005_update_pen_state(ts, x, y, pressure); ++ if (++ts->sample_cnt < TS_SAMPLES) ++ goto out; + +- /* set the penup timer */ +- mod_timer(&ts->penup_timer, +- jiffies + msecs_to_jiffies(TSC2005_PENUP_TIME_MS)); ++ x = ts->avg_x / TS_SAMPLES; ++ y = ts->avg_y / TS_SAMPLES; ++ z1 = ts->avg_z1 / TS_SAMPLES; ++ z2 = ts->avg_z2 / TS_SAMPLES; ++ } ++ ts->sample_cnt = 0; ++ ts->avg_x = 0; ++ ts->avg_y = 0; ++ ts->avg_z1 = 0; ++ ts->avg_z2 = 0; + +- if (!ts->esd_timeout) ++ /* compute touch pressure resistance using equation #1 */ ++ pressure = x * (z2 - z1) / z1; ++ pressure = pressure * ts->x_plate_ohm / 4096; ++ pressure_limit = ts->sample_sent ? ts->p_max : ts->ts_pressure; ++ if (unlikely(pressure > pressure_limit)) { ++ /* printk(KERN_ERR "skipping ts event, pressure(%u) > pressure_limit(%u)\n", pressure, pressure_limit); */ + goto out; ++ } ++ /* Discard the event if it still is within the previous rect - ++ * unless the pressure is clearly harder, but then use previous ++ * x,y position. If any coordinate deviates enough, fudging ++ * of all three will still take place in the input layer. ++ */ ++ inside_rect = (ts->sample_sent && ++ x > (int)ts->out_x - ts->fudge_x && ++ x < (int)ts->out_x + ts->fudge_x && ++ y > (int)ts->out_y - ts->fudge_y && ++ y < (int)ts->out_y + ts->fudge_y); ++ if (inside_rect) ++ x = ts->out_x, y = ts->out_y; ++ ++ if (!inside_rect || pressure < (ts->out_p - ts->fudge_p)) { ++ tsc2005_update_pen_state(ts, x, y, pressure); ++ ts->sample_sent = 1; ++ ts->out_x = x; ++ ts->out_y = y; ++ ts->out_p = pressure; ++ } ++ if (ts->sample_sent) { ++ /* set the penup timer */ ++ mod_timer(&ts->penup_timer, ++ jiffies + msecs_to_jiffies(TSC2005_PENUP_TIME_MS)); + +- /* update the watchdog timer */ +- mod_timer(&ts->esd_timer, +- round_jiffies(jiffies + msecs_to_jiffies(ts->esd_timeout))); +- ++ if (ts->esd_timeout) { ++ /* update the watchdog timer */ ++ mod_timer(&ts->esd_timer, ++ round_jiffies(jiffies + msecs_to_jiffies(ts->esd_timeout))); ++ } ++ } + out: + mutex_unlock(&ts->mutex); + return IRQ_HANDLED; +@@ -327,6 +389,7 @@ static void tsc2005_penup_work(struct work_struct *work) + + mutex_lock(&ts->mutex); + tsc2005_update_pen_state(ts, 0, 0, 0); ++ ts->sample_sent = 0; + mutex_unlock(&ts->mutex); + } + +@@ -524,10 +587,6 @@ static int __devinit tsc2005_setup(struct tsc2005 *ts, + struct tsc2005_platform_data *pdata) + { + int r; +- int fudge_x; +- int fudge_y; +- int fudge_p; +- int p_max; + int x_max; + int y_max; + +@@ -539,13 +598,14 @@ static int __devinit tsc2005_setup(struct tsc2005 *ts, + setup_timer(&ts->penup_timer, tsc2005_penup_timer, (unsigned long)ts); + INIT_WORK(&ts->penup_work, tsc2005_penup_work); + +- fudge_x = pdata->ts_x_fudge ? : 4; | ||
[-] [+] | Added | linux-2.6-twl4030-madc-Add-proper-regulator-handling.patch ^ |
@@ -0,0 +1,107 @@ +From cb5f7ef786edc81535ae0357653cd76061d9c752 Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Tue, 12 Apr 2011 11:49:13 +0300 +Subject: [PATCH] twl4030-madc: Add proper regulator handling + +The MADC block in twl4030 requires in certain cases +that the usb regulators are powered on when registers +in twl4030 are being read or written. + +This patch adds proper regulator handling to the driver, +so that it works properly in all situations. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +--- + drivers/mfd/twl4030-madc.c | 36 ++++++++++++++++++++++++++++++++++++ + 1 files changed, 36 insertions(+), 0 deletions(-) + +diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c +index 657ce87..636c5c3 100644 +--- a/drivers/mfd/twl4030-madc.c ++++ b/drivers/mfd/twl4030-madc.c +@@ -33,11 +33,15 @@ + #include <linux/i2c/twl4030-madc.h> + #include <linux/uaccess.h> + #include <linux/slab.h> ++#include <linux/regulator/consumer.h> + + #define TWL4030_MADC_PFX "twl4030-madc: " + + struct twl4030_madc_data { + struct device *dev; ++ struct regulator *usb1v5; ++ struct regulator *usb1v8; ++ struct regulator *usb3v1; + struct mutex lock; + struct work_struct ws; + struct twl4030_madc_request requests[TWL4030_MADC_NUM_METHODS]; +@@ -382,6 +386,10 @@ static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on) + u8 regval; + + if (on) { ++ regulator_enable(madc->usb3v1); ++ regulator_enable(madc->usb1v8); ++ regulator_enable(madc->usb1v5); ++ + regval = twl4030_madc_read(madc, TWL4030_MADC_CTRL1); + regval |= TWL4030_MADC_MADCON; + twl4030_madc_write(madc, TWL4030_MADC_CTRL1, regval); +@@ -394,6 +402,10 @@ static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on) + regval = twl4030_madc_read(madc, TWL4030_MADC_CTRL1); + regval &= ~TWL4030_MADC_MADCON; + twl4030_madc_write(madc, TWL4030_MADC_CTRL1, regval); ++ ++ regulator_disable(madc->usb1v5); ++ regulator_disable(madc->usb1v8); ++ regulator_disable(madc->usb3v1); + } + return ret; + } +@@ -492,6 +504,18 @@ static int __init twl4030_madc_probe(struct platform_device *pdev) + goto err_irq; + } + ++ madc->usb3v1 = regulator_get(madc->dev, "usb3v1"); ++ if (IS_ERR(madc->usb3v1)) ++ goto err_reg1; ++ ++ madc->usb1v5 = regulator_get(madc->dev, "usb1v5"); ++ if (IS_ERR(madc->usb1v5)) ++ goto err_reg2; ++ ++ madc->usb1v8 = regulator_get(madc->dev, "usb1v8"); ++ if (IS_ERR(madc->usb1v8)) ++ goto err_reg3; ++ + platform_set_drvdata(pdev, madc); + mutex_init(&madc->lock); + INIT_WORK(&madc->ws, twl4030_madc_work); +@@ -500,6 +524,14 @@ static int __init twl4030_madc_probe(struct platform_device *pdev) + + return 0; + ++err_reg3: ++ regulator_put(madc->usb1v5); ++err_reg2: ++ regulator_put(madc->usb3v1); ++err_reg1: ++ free_irq(platform_get_irq(pdev, 0), madc); ++ dev_err(madc->dev, "Failed to get vusb regulators\n"); ++ ret = -ENODEV; + err_irq: + misc_deregister(&twl4030_madc_device); + +@@ -516,6 +548,10 @@ static int __exit twl4030_madc_remove(struct platform_device *pdev) + + free_irq(platform_get_irq(pdev, 0), madc); + cancel_work_sync(&madc->ws); ++ regulator_put(madc->usb1v5); ++ regulator_put(madc->usb1v8); ++ regulator_put(madc->usb3v1); ++ + misc_deregister(&twl4030_madc_device); + + return 0; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-usb-musb-add-mA-and-charger-sysfs-entries.patch ^ |
@@ -0,0 +1,117 @@ +From 05c35d6d71c6baae4e94b92e1ff209c20f72ad80 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi <felipe.balbi@nokia.com> +Date: Mon, 4 Jan 2010 15:05:37 +0200 +Subject: [PATCH 01/42] usb: musb: add mA and charger sysfs entries + +This is the same mA entry and charger entry used in Fremantle program. +We are adding it as __deprecated because it will change and this is +done just for us to be able to test USB charging funtionality. + +One difference from Fremantle is that we now issue +sysfs_notify() when that value changes. + +Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/usb/musb/musb_core.c | 29 +++++++++++++++++++++++++++++ + drivers/usb/musb/musb_core.h | 2 ++ + drivers/usb/musb/musb_gadget.c | 9 +++++++++ + 3 files changed, 40 insertions(+), 0 deletions(-) + +diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c +index 99beebc..6ee2ba1 100644 +--- a/drivers/usb/musb/musb_core.c ++++ b/drivers/usb/musb/musb_core.c +@@ -1801,6 +1801,27 @@ musb_vbus_show(struct device *dev, struct device_attribute *attr, char *buf) + } + static DEVICE_ATTR(vbus, 0644, musb_vbus_show, musb_vbus_store); + ++static ssize_t ++musb_ma_show(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ struct musb *musb = dev_to_musb(dev); ++ ++ return snprintf(buf, PAGE_SIZE, "%d\n", musb->power_draw); ++} ++static DEVICE_ATTR(mA, 0444, musb_ma_show, NULL); ++ ++static ssize_t ++musb_charger_show(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ struct musb *musb = dev_to_musb(dev); ++ int charger; ++ ++ charger = otg_detect_charger(musb->xceiv); ++ ++ return snprintf(buf, PAGE_SIZE, "%d\n", charger); ++} ++static DEVICE_ATTR(charger, 0444, musb_charger_show, NULL); ++ + #ifdef CONFIG_USB_GADGET_MUSB_HDRC + + /* Gadget drivers can't know that a host is connected so they might want +@@ -1831,6 +1852,8 @@ static DEVICE_ATTR(srp, 0644, NULL, musb_srp_store); + static struct attribute *musb_attributes[] = { + &dev_attr_mode.attr, + &dev_attr_vbus.attr, ++ &dev_attr_mA.attr, ++ &dev_attr_charger.attr, + #ifdef CONFIG_USB_GADGET_MUSB_HDRC + &dev_attr_srp.attr, + #endif +@@ -1848,11 +1871,17 @@ static void musb_irq_work(struct work_struct *data) + { + struct musb *musb = container_of(data, struct musb, irq_work); + static int old_state; ++ static int old_power_draw; + + if (musb->xceiv->state != old_state) { + old_state = musb->xceiv->state; + sysfs_notify(&musb->controller->kobj, NULL, "mode"); + } ++ ++ if (musb->power_draw != old_power_draw) { ++ old_power_draw = musb->power_draw; ++ sysfs_notify(&musb->controller->kobj, NULL, "mA"); ++ } + } + + /* -------------------------------------------------------------------------- +diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h +index febaabc..16061a9 100644 +--- a/drivers/usb/musb/musb_core.h ++++ b/drivers/usb/musb/musb_core.h +@@ -402,6 +402,8 @@ struct musb { + + u8 min_power; /* vbus for periph, in mA/2 */ + ++ unsigned power_draw __deprecated; /* current power drawn, gadget only */ ++ + bool is_host; + + int a_wait_bcon; /* VBUS timeout in msecs */ +diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c +index 9d6ade8..927a420 100644 +--- a/drivers/usb/musb/musb_gadget.c ++++ b/drivers/usb/musb/musb_gadget.c +@@ -1588,8 +1588,17 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) + { + struct musb *musb = gadget_to_musb(gadget); + ++ /* REVISIT we shouldn't need to be passing ++ * this kind of value to userland. We have ++ * now the blocking notifier for transceivers ++ * which could very well handle this ++ */ ++ musb->power_draw = mA; ++ schedule_work(&musb->irq_work); ++ + if (!musb->xceiv->set_power) + return -EOPNOTSUPP; ++ + return otg_set_power(musb->xceiv, mA); + } + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-usb-musb-add-suspend-sysfs-entry.patch ^ |
@@ -0,0 +1,73 @@ +From b5f866b4991a0bd6f3ef2e237930c4e69cdee943 Mon Sep 17 00:00:00 2001 +From: Ameya Palande <ameya.palande@nokia.com> +Date: Fri, 9 Apr 2010 19:00:02 +0300 +Subject: [PATCH 02/42] usb: musb: add suspend sysfs entry + +This patch is combination of following patches: +1. usb: musb: suspend notification only when needed +2. usb: musb: Notify sysfs on suspend +3. usb: musb: fix build with MUSB Host only mode + +Signed-off-by: Niilo Minkkinen <ext-niilo.1.minkkinen@nokia.com> +Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> +Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> +Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> +Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com> +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + drivers/usb/musb/musb_core.c | 18 +++++++++++++++++- + 1 files changed, 17 insertions(+), 1 deletions(-) + +diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c +index 6ee2ba1..16ce100 100644 +--- a/drivers/usb/musb/musb_core.c ++++ b/drivers/usb/musb/musb_core.c +@@ -1824,6 +1824,15 @@ static DEVICE_ATTR(charger, 0444, musb_charger_show, NULL); + + #ifdef CONFIG_USB_GADGET_MUSB_HDRC + ++static ssize_t ++musb_suspend_show(struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ struct musb *musb = dev_to_musb(dev); ++ ++ return sprintf(buf, "%d\n", musb->is_suspended); ++} ++static DEVICE_ATTR(suspend, 0444, musb_suspend_show, NULL); ++ + /* Gadget drivers can't know that a host is connected so they might want + * to start SRP, but users can. This allows userspace to trigger SRP. + */ +@@ -1855,6 +1864,7 @@ static struct attribute *musb_attributes[] = { + &dev_attr_mA.attr, + &dev_attr_charger.attr, + #ifdef CONFIG_USB_GADGET_MUSB_HDRC ++ &dev_attr_suspend.attr, + &dev_attr_srp.attr, + #endif + NULL +@@ -1870,7 +1880,7 @@ static const struct attribute_group musb_attr_group = { + static void musb_irq_work(struct work_struct *data) + { + struct musb *musb = container_of(data, struct musb, irq_work); +- static int old_state; ++ static int old_state, old_suspend; + static int old_power_draw; + + if (musb->xceiv->state != old_state) { +@@ -1882,6 +1892,12 @@ static void musb_irq_work(struct work_struct *data) + old_power_draw = musb->power_draw; + sysfs_notify(&musb->controller->kobj, NULL, "mA"); + } ++#ifdef CONFIG_USB_GADGET_MUSB_HDRC ++ if (old_suspend != musb->is_suspended) { ++ old_suspend = musb->is_suspended; ++ sysfs_notify(&musb->controller->kobj, NULL, "suspend"); ++ } ++#endif + } + + /* -------------------------------------------------------------------------- +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-usb-musb-ignore-spurious-SESSREQ-interrupts.patch ^ |
@@ -0,0 +1,42 @@ +From a4141a006d030b052d14298746ed65fbfed38884 Mon Sep 17 00:00:00 2001 +From: Heikki Krogerus <ext-heikki.krogerus@nokia.com> +Date: Thu, 9 Sep 2010 16:55:21 +0300 +Subject: [PATCH 04/42] usb: musb: ignore spurious SESSREQ interrupts + +The charger detection may cause spurious SESSREQ interrupts. +This will ignore any SESSREQ interrupt if musb is B-device. + +Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> +--- + drivers/usb/musb/musb_core.c | 15 ++++++++++----- + 1 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c +index 16ce100..4e89353 100644 +--- a/drivers/usb/musb/musb_core.c ++++ b/drivers/usb/musb/musb_core.c +@@ -567,11 +567,16 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, + * - ... to A_WAIT_BCON. + * a_wait_vrise_tmout triggers VBUS_ERROR transitions + */ +- musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); +- musb->ep0_stage = MUSB_EP0_START; +- musb->xceiv->state = OTG_STATE_A_IDLE; +- MUSB_HST_MODE(musb); +- musb_set_vbus(musb, 1); ++ if ((devctl & MUSB_DEVCTL_VBUS) ++ && !(devctl & MUSB_DEVCTL_BDEVICE)) { ++ musb_writeb(mbase, MUSB_DEVCTL, MUSB_DEVCTL_SESSION); ++ musb->ep0_stage = MUSB_EP0_START; ++ musb->xceiv->state = OTG_STATE_A_IDLE; ++ MUSB_HST_MODE(musb); ++ musb_set_vbus(musb, 1); ++ } else { ++ DBG(5, "discarding SESSREQ INT\n"); ++ } + + handled = IRQ_HANDLED; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-usb-otg-add-detect_charger-field-to-otg_transceiver.patch ^ |
@@ -0,0 +1,46 @@ +From 7d6c0a22b5c6c83bda70f82329cf8ed1d0549c7c Mon Sep 17 00:00:00 2001 +From: Felipe Balbi <felipe.balbi@nokia.com> +Date: Mon, 4 Jan 2010 15:20:28 +0200 +Subject: [PATCH 03/42] usb: otg: add detect_charger field to otg_transceiver + +Then we can allow musb to kick charger detection on transceiver. +This is added as __deprecated because it only exists to mimic +the behavior we had in Fremantle. + +Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> +--- + include/linux/usb/otg.h | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h +index 0a5b371..2ad773a 100644 +--- a/include/linux/usb/otg.h ++++ b/include/linux/usb/otg.h +@@ -110,6 +110,8 @@ struct otg_transceiver { + /* start or continue HNP role switch */ + int (*start_hnp)(struct otg_transceiver *otg); + ++ /* detect a charger */ ++ int (*detect_charger)(struct otg_transceiver *otg) __deprecated; + }; + + +@@ -230,6 +232,15 @@ otg_start_srp(struct otg_transceiver *otg) + return otg->start_srp(otg); + } + ++static inline int ++otg_detect_charger(struct otg_transceiver *otg) ++{ ++ if (otg->detect_charger) ++ return otg->detect_charger(otg); ++ ++ return 0; ++} ++ + /* notifiers */ + static inline int + otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-usb-otg-introduce-otg_notify_event-and-otg_get_last_.patch ^ |
@@ -0,0 +1,108 @@ +From bb70bd42b5391f928257ede38a3fc105897d1bbd Mon Sep 17 00:00:00 2001 +From: Heikki Krogerus <ext-heikki.krogerus@nokia.com> +Date: Tue, 19 Oct 2010 15:14:11 +0200 +Subject: [PATCH 05/42] usb: otg: introduce otg_notify_event and otg_get_last_event + +otg_notify_event is a simpler way to call the notifier. +otg_get_last_event allows drivers to get the last event in +case the event has been notified before the driver has +probed. + +Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com> +--- + drivers/power/isp1704_charger.c | 4 ++++ + drivers/usb/musb/musb_gadget.c | 11 +++++------ + drivers/usb/otg/twl4030-usb.c | 3 +-- + include/linux/usb/otg.h | 18 ++++++++++++++++++ + 4 files changed, 28 insertions(+), 8 deletions(-) + +diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c +index 7251218..bc88c5c 100644 +--- a/drivers/power/isp1704_charger.c ++++ b/drivers/power/isp1704_charger.c +@@ -318,6 +318,10 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev) + + dev_info(isp->dev, "registered with product id %s\n", isp->model); + ++ ret = otg_get_last_event(isp->otg); ++ if (ret) ++ dev_warn(isp->dev, "failed to get last event\n"); ++ + return 0; + fail2: + power_supply_unregister(&isp->psy); +diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c +index 927a420..5d0f038 100644 +--- a/drivers/usb/musb/musb_gadget.c ++++ b/drivers/usb/musb/musb_gadget.c +@@ -1588,12 +1588,11 @@ static int musb_gadget_vbus_draw(struct usb_gadget *gadget, unsigned mA) + { + struct musb *musb = gadget_to_musb(gadget); + +- /* REVISIT we shouldn't need to be passing +- * this kind of value to userland. We have +- * now the blocking notifier for transceivers +- * which could very well handle this +- */ +- musb->power_draw = mA; ++ if (musb->power_draw != mA && mA > 0) { ++ musb->power_draw = mA; ++ otg_notify_event(musb->xceiv, USB_EVENT_ENUMERATED, ++ &musb->power_draw); ++ } + schedule_work(&musb->irq_work); + + if (!musb->xceiv->set_power) +diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c +index d335f48..f55cb0d 100644 +--- a/drivers/usb/otg/twl4030-usb.c ++++ b/drivers/usb/otg/twl4030-usb.c +@@ -512,8 +512,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl) + else + twl4030_phy_resume(twl); + +- blocking_notifier_call_chain(&twl->otg.notifier, status, +- twl->otg.gadget); ++ otg_notify_event(&twl->otg, status, twl->otg.gadget); + } + sysfs_notify(&twl->dev->kobj, NULL, "vbus"); + +diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h +index 2ad773a..890d541 100644 +--- a/include/linux/usb/otg.h ++++ b/include/linux/usb/otg.h +@@ -64,6 +64,8 @@ struct otg_transceiver { + const char *label; + unsigned int flags; + ++ void *last_event_data; ++ u8 last_event; + u8 default_a; + enum usb_otg_state state; + +@@ -248,6 +250,22 @@ otg_register_notifier(struct otg_transceiver *otg, struct notifier_block *nb) + return blocking_notifier_chain_register(&otg->notifier, nb); + } + ++static inline int ++otg_notify_event(struct otg_transceiver *otg, enum usb_xceiv_events event, ++ void *data) ++{ ++ otg->last_event = event; ++ otg->last_event_data = data; ++ ++ return blocking_notifier_call_chain(&otg->notifier, event, data); ++} ++ ++static inline int ++otg_get_last_event(struct otg_transceiver *otg) ++{ ++ return otg_notify_event(otg, otg->last_event, otg->last_event_data); ++} ++ + static inline void + otg_unregister_notifier(struct otg_transceiver *otg, struct notifier_block *nb) + { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6-watchdog-omap-wdt-add-fine-grain-runtime-pm.patch ^ |
@@ -0,0 +1,143 @@ +From kalle.jokiniemi@nokia.com Fri Mar 11 10:33:45 2011 +Date: Fri, 11 Mar 2011 09:32:09 +0100 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +To: ilkka.koskinen@nokia.com +Subject: [PATCH 1/2] Watchdog: omap_wdt: add fine grain runtime-pm + +From: Paul Walmsley <paul@pwsan.com> + +The omap_wdt should only be in full active state when the +registers are being accessed. Otherwise the device can be +on lower power mode. + +This patch is based on a patch created by Kalle Jokiniemi: +https://patchwork.kernel.org/patch/618231/ +which is itself based on a patch created by Atal +Shargorodsky: http://lkml.org/lkml/2009/3/10/266. + +Signed-off-by: Paul Walmsley <paul@pwsan.com> +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Tested-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Cc: Wim Van Sebroeck <wim@iguana.be> +--- + drivers/watchdog/omap_wdt.c | 25 +++++++++++++++++++++++-- + 1 files changed, 23 insertions(+), 2 deletions(-) + +diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c +index 3dd4971..2b4acb8 100644 +--- a/drivers/watchdog/omap_wdt.c ++++ b/drivers/watchdog/omap_wdt.c +@@ -124,6 +124,8 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) + u32 pre_margin = GET_WLDR_VAL(timer_margin); + void __iomem *base = wdev->base; + ++ pm_runtime_get_sync(wdev->dev); ++ + /* just count up at 32 KHz */ + while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) + cpu_relax(); +@@ -131,6 +133,8 @@ static void omap_wdt_set_timeout(struct omap_wdt_dev *wdev) + __raw_writel(pre_margin, base + OMAP_WATCHDOG_LDR); + while (__raw_readl(base + OMAP_WATCHDOG_WPS) & 0x04) + cpu_relax(); ++ ++ pm_runtime_put_sync(wdev->dev); + } + + /* +@@ -160,6 +164,8 @@ static int omap_wdt_open(struct inode *inode, struct file *file) + omap_wdt_ping(wdev); /* trigger loading of new timeout value */ + omap_wdt_enable(wdev); + ++ pm_runtime_put_sync(wdev->dev); ++ + return nonseekable_open(inode, file); + } + +@@ -171,6 +177,7 @@ static int omap_wdt_release(struct inode *inode, struct file *file) + * Shut off the timer unless NOWAYOUT is defined. + */ + #ifndef CONFIG_WATCHDOG_NOWAYOUT ++ pm_runtime_get_sync(wdev->dev); + + omap_wdt_disable(wdev); + +@@ -190,9 +197,11 @@ static ssize_t omap_wdt_write(struct file *file, const char __user *data, + + /* Refresh LOAD_TIME. */ + if (len) { ++ pm_runtime_get_sync(wdev->dev); + spin_lock(&wdt_lock); + omap_wdt_ping(wdev); + spin_unlock(&wdt_lock); ++ pm_runtime_put_sync(wdev->dev); + } + return len; + } +@@ -224,15 +233,18 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, + return put_user(omap_prcm_get_reset_sources(), + (int __user *)arg); + case WDIOC_KEEPALIVE: ++ pm_runtime_get_sync(wdev->dev); + spin_lock(&wdt_lock); + omap_wdt_ping(wdev); + spin_unlock(&wdt_lock); ++ pm_runtime_put_sync(wdev->dev); + return 0; + case WDIOC_SETTIMEOUT: + if (get_user(new_margin, (int __user *)arg)) + return -EFAULT; + omap_wdt_adjust_timeout(new_margin); + ++ pm_runtime_get_sync(wdev->dev); + spin_lock(&wdt_lock); + omap_wdt_disable(wdev); + omap_wdt_set_timeout(wdev); +@@ -240,6 +252,7 @@ static long omap_wdt_ioctl(struct file *file, unsigned int cmd, + + omap_wdt_ping(wdev); + spin_unlock(&wdt_lock); ++ pm_runtime_put_sync(wdev->dev); + /* Fall */ + case WDIOC_GETTIMEOUT: + return put_user(timer_margin, (int __user *)arg); +@@ -345,8 +358,11 @@ static void omap_wdt_shutdown(struct platform_device *pdev) + { + struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); + +- if (wdev->omap_wdt_users) ++ if (wdev->omap_wdt_users) { ++ pm_runtime_get_sync(wdev->dev); + omap_wdt_disable(wdev); ++ pm_runtime_put_sync(wdev->dev); ++ } + } + + static int __devexit omap_wdt_remove(struct platform_device *pdev) +@@ -381,8 +397,11 @@ static int omap_wdt_suspend(struct platform_device *pdev, pm_message_t state) + { + struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); + +- if (wdev->omap_wdt_users) ++ if (wdev->omap_wdt_users) { ++ pm_runtime_get_sync(wdev->dev); + omap_wdt_disable(wdev); ++ pm_runtime_put_sync(wdev->dev); ++ } + + return 0; + } +@@ -392,8 +411,10 @@ static int omap_wdt_resume(struct platform_device *pdev) + struct omap_wdt_dev *wdev = platform_get_drvdata(pdev); + + if (wdev->omap_wdt_users) { ++ pm_runtime_get_sync(wdev->dev); + omap_wdt_enable(wdev); + omap_wdt_ping(wdev); ++ pm_runtime_put_sync(wdev->dev); + } + + return 0; +-- +1.7.1 + | ||
[-] [+] | Added | linux-2.6-wlan-added-netlink-support-for-wl1251-driver.patch ^ |
@@ -0,0 +1,879 @@ +From a070b7040790ad5c88e7c99ac59d3355c7ef6feb Mon Sep 17 00:00:00 2001 +From: Srikar <ext-srikar.1.bhavanarayana@nokia.com> +Date: Tue, 28 Dec 2010 13:18:15 +0100 +Subject: [PATCH 40/42] wlan:added netlink support for wl1251 driver + +Added Netlink support for wl1251 driver for +getting and setting MAC address required by wl1251-cal +tool + +Signed-off-by: Srikar <ext-srikar.1.bhavanarayana@nokia.com> +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + drivers/net/wireless/wl1251/Makefile | 2 +- + drivers/net/wireless/wl1251/main.c | 86 +++++ + drivers/net/wireless/wl1251/netlink.c | 678 +++++++++++++++++++++++++++++++++ + drivers/net/wireless/wl1251/netlink.h | 30 ++ + 4 files changed, 795 insertions(+), 1 deletions(-) + create mode 100644 drivers/net/wireless/wl1251/netlink.c + create mode 100644 drivers/net/wireless/wl1251/netlink.h + +diff --git a/drivers/net/wireless/wl1251/Makefile b/drivers/net/wireless/wl1251/Makefile +index 58b4f93..b7fd75c 100644 +--- a/drivers/net/wireless/wl1251/Makefile ++++ b/drivers/net/wireless/wl1251/Makefile +@@ -1,5 +1,5 @@ + wl1251-objs = main.o event.o tx.o rx.o ps.o cmd.o \ +- acx.o boot.o init.o debugfs.o io.o ++ acx.o boot.o init.o debugfs.o io.o netlink.o + wl1251_spi-objs += spi.o + wl1251_sdio-objs += sdio.o + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index 7a87625..e270d97 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -28,6 +28,7 @@ + #include <linux/etherdevice.h> + #include <linux/vmalloc.h> + #include <linux/slab.h> ++#include <linux/inetdevice.h> + + #include "wl1251.h" + #include "wl12xx_80211.h" +@@ -41,6 +42,7 @@ + #include "init.h" + #include "debugfs.h" + #include "boot.h" ++#include "netlink.h" + + void wl1251_enable_interrupts(struct wl1251 *wl) + { +@@ -372,6 +374,85 @@ out: + mutex_unlock(&wl->mutex); + } + ++static int wl1251_plt_init(struct wl1251 *wl) ++{ ++ int ret; ++ ++ ret = wl1251_hw_init_mem_config(wl); ++ if (ret < 0) ++ return ret; ++ ++ ret = wl1251_cmd_data_path(wl, wl->channel, 1); ++ if (ret < 0) ++ return ret; ++ ++ return 0; ++} ++ ++int wl1251_plt_start(struct wl1251 *wl) ++{ ++ int ret; ++ ++ mutex_lock(&wl->mutex); ++ ++ wl1251_notice("power up"); ++ ++ if (wl->state != WL1251_STATE_OFF) { ++ wl1251_error("cannot go into PLT state because not " ++ "in off state: %d", wl->state); ++ ret = -EBUSY; ++ goto out; ++ } ++ ++ wl->state = WL1251_STATE_PLT; ++ ++ ret = wl1251_chip_wakeup(wl); ++ if (ret < 0) ++ goto out; ++ ++ ret = wl1251_boot(wl); ++ if (ret < 0) ++ goto out; ++ ++ wl1251_notice("firmware booted in PLT mode (%s)", wl->fw_ver); ++ ++ ret = wl1251_plt_init(wl); ++ if (ret < 0) ++ goto out; ++ ++out: ++ mutex_unlock(&wl->mutex); ++ ++ return ret; ++} ++ ++int wl1251_plt_stop(struct wl1251 *wl) ++{ ++ int ret = 0; ++ ++ mutex_lock(&wl->mutex); ++ ++ wl1251_notice("power down"); ++ ++ if (wl->state != WL1251_STATE_PLT) { ++ wl1251_error("cannot power down because not in PLT " ++ "state: %d", wl->state); ++ ret = -EBUSY; ++ goto out; ++ } ++ ++ wl1251_disable_interrupts(wl); ++ wl1251_power_off(wl); ++ ++ wl->state = WL1251_STATE_OFF; ++ ++out: ++ mutex_unlock(&wl->mutex); ++ ++ return ret; ++} ++ ++ + static int wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) + { + struct wl1251 *wl = hw->priv; +@@ -1322,6 +1403,10 @@ int wl1251_init_ieee80211(struct wl1251 *wl) + if (ret) + goto out; + ++ ret = wl1251_nl_register(); ++ if (ret) ++ goto out; ++ + wl1251_debugfs_init(wl); + wl1251_notice("initialized"); + +@@ -1424,6 +1509,7 @@ int wl1251_free_hw(struct wl1251 *wl) + wl->rx_descriptor = NULL; + + ieee80211_free_hw(wl->hw); ++ wl1251_nl_unregister(); + + return 0; + } +diff --git a/drivers/net/wireless/wl1251/netlink.c b/drivers/net/wireless/wl1251/netlink.c +new file mode 100644 +index 0000000..bcf12f2 +--- /dev/null ++++ b/drivers/net/wireless/wl1251/netlink.c +@@ -0,0 +1,678 @@ ++/* ++ * This file is part of wl1251 ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * ++ * Contact: Kalle Valo <kalle.valo@nokia.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 "netlink.h" ++ ++#include <linux/mutex.h> ++#include <linux/socket.h> ++#include <net/net_namespace.h> ++#include <net/sock.h> ++#include <net/genetlink.h> ++ ++#include <net/mac80211.h> ++#include "io.h" ++#include "wl1251.h" ++#include "acx.h" ++ ++/* FIXME: this should be changed as soon as user space catches up */ ++#define WL1251_NL_NAME "wl1251" | ||
[-] [+] | Added | linux-2.6.35-fatal-signals.patch ^ |
@@ -0,0 +1,27 @@ +From: Arjan van de Ven <arjan@linux.intel.com> +Subject: Tweak the default of the "print fatal signals" tunables + +In the distro we've had a few hard to diagnose cases where init segfaulted early. +To get some better diagnostics, turn on print_fatal_signals from the start. + +In the upstream kernel the argument is that this is already a sysctl and a kernel +parameter; and they are right about this. However for us to get pragmatic data +from our testers, we need this to just always be there no matter what +(independent of bootloader issues etc etc) + +Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> + + +Index: linux-2.6.34/kernel/signal.c +=================================================================== +--- linux-2.6.34.orig/kernel/signal.c ++++ linux-2.6.34/kernel/signal.c +@@ -43,7 +43,7 @@ + + static struct kmem_cache *sigqueue_cachep; + +-int print_fatal_signals __read_mostly; ++int print_fatal_signals = 1; + + static void __user *sig_handler(struct task_struct *t, int sig) + { | ||
[-] [+] | Added | linux-2.6.37-rc3-vfs-dirty-inode.patch ^ |
@@ -0,0 +1,105 @@ +From 3950d3c04a6bf8ccf9ff912a49bdd242a2fe9e47 Mon Sep 17 00:00:00 2001 +From: Arjan van de Ven <arjan@linux.intel.com> +Date: Fri, 26 Nov 2010 12:18:03 -0800 +Subject: [PATCH] vfs: Add a trace point in the mark_inode_dirty function + +PowerTOP would like to be able to show who is keeping the disk +busy by dirtying data. The most logical spot for this is in the vfs +in the mark_inode_dirty() function, doing this on the block level +is not possible because by the time the IO hits the block layer the +guilty party can no longer be found ("kjournald" and "pdflush" are not +useful answers to "who caused this file to be dirty). + +The trace point follows the same logic/style as the block_dump code +and pretty much dumps the same data, just not to dmesg (and thus to +/var/log/messages) but via the trace events streams. + +Eventually we should be able to phase out the block dump code, but that's +for later on after a transition time. + +Signed-of-by: Arjan van de Ven <arjan@linux.intel.com> +--- + fs/fs-writeback.c | 3 +++ + include/linux/fs.h | 12 ++++++++++++ + include/trace/events/writeback.h | 28 ++++++++++++++++++++++++++++ + 3 files changed, 43 insertions(+), 0 deletions(-) + +diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c +index 3d06ccc..62e33cc 100644 +--- a/fs/fs-writeback.c ++++ b/fs/fs-writeback.c +@@ -952,6 +952,9 @@ void __mark_inode_dirty(struct inode *inode, int flags) + if ((inode->i_state & flags) == flags) + return; + ++ if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)) ++ trace_writeback_inode_dirty(inode, flags); ++ + if (unlikely(block_dump)) + block_dump___mark_inode_dirty(inode); + +diff --git a/include/linux/fs.h b/include/linux/fs.h +index c9e06cc..25935e1 100644 +--- a/include/linux/fs.h ++++ b/include/linux/fs.h +@@ -1676,6 +1676,18 @@ struct super_operations { + + #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES) + ++#define INODE_DIRTY_FLAGS \ ++ { I_DIRTY_SYNC, "DIRTY-SYNC" }, \ ++ { I_DIRTY_DATASYNC, "DIRTY-DATASYNC" }, \ ++ { I_DIRTY_PAGES, "DIRTY-PAGES" }, \ ++ { I_NEW, "NEW" }, \ ++ { I_WILL_FREE, "WILL-FREE" }, \ ++ { I_FREEING, "FREEING" }, \ ++ { I_CLEAR, "CLEAR" }, \ ++ { I_SYNC, "SYNC" }, \ ++ { I_REFERENCED, "REFERENCED" } ++ ++ + extern void __mark_inode_dirty(struct inode *, int); + static inline void mark_inode_dirty(struct inode *inode) + { +diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h +index 89a2b2d..5c80875 100644 +--- a/include/trace/events/writeback.h ++++ b/include/trace/events/writeback.h +@@ -186,6 +186,34 @@ DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested, + TP_ARGS(usec_timeout, usec_delayed) + ); + ++/* ++ * Tracepoint for dirtying an inode; used by PowerTOP ++ */ ++TRACE_EVENT(writeback_inode_dirty, ++ ++ TP_PROTO(struct inode *inode, int flags), ++ ++ TP_ARGS(inode, flags), ++ ++ TP_STRUCT__entry( ++ __field( __kernel_dev_t, dev ) ++ __field( ino_t, ino ) ++ __field( u32, flags ) ++ ), ++ ++ TP_fast_assign( ++ __entry->dev = inode->i_sb->s_dev; ++ __entry->ino = inode->i_ino; ++ __entry->flags = flags; ++ ), ++ ++ TP_printk("dev %d:%d ino %lu flags %d %s", MAJOR(__entry->dev), MINOR(__entry->dev), ++ (unsigned long) __entry->ino, ++ __entry->flags, ++ __print_flags(__entry->flags, "|", INODE_DIRTY_FLAGS) ++ ) ++); ++ + #endif /* _TRACE_WRITEBACK_H */ + + /* This part must be outside protection */ +-- +1.7.2.3 + | ||
[-] [+] | Added | linux-2.6.37-upgrade-sgx-driver.patch ^ |
@@ -0,0 +1,25307 @@ +From 1f56b5d42ea7d163f72185c49515fc7f7bad0a2b Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Tue, 14 Dec 2010 03:00:35 +0200 +Subject: [PATCH 01/95] gpu: pvr: remove build time ABI dependency on the EDM + trace option + +So that we can build user / kernel space independently on the EDM +tracing option being configured or not. + +Signed-off-by: Imre Deak <imre.deak@nokia.com> +--- + drivers/gpu/pvr/bridged_sgx_bridge.c | 37 ++++++++++++++------------------- + drivers/gpu/pvr/sgx_options.h | 4 --- + drivers/gpu/pvr/sgxinfo.h | 4 --- + drivers/gpu/pvr/sgxinfokm.h | 3 +- + drivers/gpu/pvr/sgxinit.c | 5 +--- + 5 files changed, 18 insertions(+), 35 deletions(-) + +diff --git a/drivers/gpu/pvr/bridged_sgx_bridge.c b/drivers/gpu/pvr/bridged_sgx_bridge.c +index b2dae37..dabcaa4 100644 +--- a/drivers/gpu/pvr/bridged_sgx_bridge.c ++++ b/drivers/gpu/pvr/bridged_sgx_bridge.c +@@ -582,6 +582,7 @@ int SGXDevInitPart2BW(u32 ui32BridgeID, + IMG_BOOL bLookupFailed = IMG_FALSE; + IMG_BOOL bReleaseFailed = IMG_FALSE; + void *hDummy; ++ void **edm_mi; + u32 i; + + PVRSRV_BRIDGE_ASSERT_CMD(ui32BridgeID, PVRSRV_BRIDGE_SGX_DEVINITPART2); +@@ -640,13 +641,12 @@ int SGXDevInitPart2BW(u32 ui32BridgeID, + PVRSRV_HANDLE_TYPE_MEM_INFO); + bLookupFailed |= (IMG_BOOL) (eError != PVRSRV_OK); + +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) +- eError = PVRSRVLookupHandle(psPerProc->psHandleBase, &hDummy, +- psSGXDevInitPart2IN->sInitInfo. +- hKernelEDMStatusBufferMemInfo, +- PVRSRV_HANDLE_TYPE_MEM_INFO); +- bLookupFailed |= (IMG_BOOL) (eError != PVRSRV_OK); +-#endif ++ edm_mi = &psSGXDevInitPart2IN->sInitInfo.hKernelEDMStatusBufferMemInfo; ++ if (*edm_mi) { ++ eError = PVRSRVLookupHandle(psPerProc->psHandleBase, &hDummy, ++ *edm_mi, PVRSRV_HANDLE_TYPE_MEM_INFO); ++ bLookupFailed |= eError != PVRSRV_OK; ++ } + + for (i = 0; i < SGX_MAX_INIT_MEM_HANDLES; i++) { + void *hHandle = +@@ -724,15 +724,12 @@ int SGXDevInitPart2BW(u32 ui32BridgeID, + PVRSRV_HANDLE_TYPE_MEM_INFO); + bReleaseFailed |= (IMG_BOOL)(eError != PVRSRV_OK); + +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) +- eError = PVRSRVLookupAndReleaseHandle(psPerProc->psHandleBase, +- &psSGXDevInitPart2IN->sInitInfo. +- hKernelEDMStatusBufferMemInfo, +- psSGXDevInitPart2IN->sInitInfo. +- hKernelEDMStatusBufferMemInfo, ++ if (*edm_mi) { ++ eError = PVRSRVLookupAndReleaseHandle(psPerProc->psHandleBase, ++ edm_mi, *edm_mi, + PVRSRV_HANDLE_TYPE_MEM_INFO); +- bReleaseFailed |= (IMG_BOOL)(eError != PVRSRV_OK); +-#endif ++ bReleaseFailed |= eError != PVRSRV_OK; ++ } + + for (i = 0; i < SGX_MAX_INIT_MEM_HANDLES; i++) { + void **phHandle = +@@ -791,12 +788,10 @@ int SGXDevInitPart2BW(u32 ui32BridgeID, + hKernelHWPerfCBMemInfo); + bDissociateFailed |= (IMG_BOOL) (eError != PVRSRV_OK); + +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) +- eError = PVRSRVDissociateDeviceMemKM(hDevCookieInt, +- psSGXDevInitPart2IN->sInitInfo. +- hKernelEDMStatusBufferMemInfo); +- bDissociateFailed |= (IMG_BOOL) (eError != PVRSRV_OK); +-#endif ++ if (*edm_mi) { ++ eError = PVRSRVDissociateDeviceMemKM(hDevCookieInt, *edm_mi); ++ bDissociateFailed |= eError != PVRSRV_OK; ++ } + + for (i = 0; i < SGX_MAX_INIT_MEM_HANDLES; i++) { + void *hHandle = +diff --git a/drivers/gpu/pvr/sgx_options.h b/drivers/gpu/pvr/sgx_options.h +index 67402fe..858c1e9 100644 +--- a/drivers/gpu/pvr/sgx_options.h ++++ b/drivers/gpu/pvr/sgx_options.h +@@ -38,12 +38,8 @@ + #define OPTIONS_BIT1 0x0 + #endif + +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) || defined(INTERNAL_TEST) + #define PVRSRV_USSE_EDM_STATUS_DEBUG_SET_OFFSET OPTIONS_BIT2 + #define OPTIONS_BIT2 (0x1 << 2) +-#else +-#define OPTIONS_BIT2 0x0 +-#endif + + #define SUPPORT_HW_RECOVERY_SET_OFFSET OPTIONS_BIT3 + #define OPTIONS_BIT3 (0x1 << 3) +diff --git a/drivers/gpu/pvr/sgxinfo.h b/drivers/gpu/pvr/sgxinfo.h +index 11f599f..955261a 100644 +--- a/drivers/gpu/pvr/sgxinfo.h ++++ b/drivers/gpu/pvr/sgxinfo.h +@@ -56,9 +56,7 @@ struct SGX_BRIDGE_INIT_INFO { + u32 ui32HostKickAddress; + u32 ui32GetMiscInfoAddress; + void *hKernelHWPerfCBMemInfo; +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) + void *hKernelEDMStatusBufferMemInfo; +-#endif + + u32 ui32EDMTaskReg0; + u32 ui32EDMTaskReg1; +@@ -198,10 +196,8 @@ struct SGXMKIF_HOST_CTL { + + u32 ui32HWPerfFlags; + +-#if defined(PVRSRV_USSE_EDM_STATUS_DEBUG) + /* !< See SGXMK_STATUS_BUFFER */ + struct IMG_DEV_VIRTADDR sEDMStatusBuffer; +-#endif + + /*< to count time wraps in the Timer task */ + u32 ui32TimeWraps; +diff --git a/drivers/gpu/pvr/sgxinfokm.h b/drivers/gpu/pvr/sgxinfokm.h +index 6db6bb3..887ebe6 100644 +--- a/drivers/gpu/pvr/sgxinfokm.h ++++ b/drivers/gpu/pvr/sgxinfokm.h +@@ -99,10 +99,9 @@ struct PVRSRV_SGXDEV_INFO { + struct PVRSRV_SGXDEV_DIFF_INFO sDiffInfo; + u32 ui32HWGroupRequested; + u32 ui32HWReset; +-#ifdef PVRSRV_USSE_EDM_STATUS_DEBUG ++ + /*!< Meminfo for EDM status buffer */ + struct PVRSRV_KERNEL_MEM_INFO *psKernelEDMStatusBufferMemInfo; +-#endif + + u32 ui32ClientRefCount; + +diff --git a/drivers/gpu/pvr/sgxinit.c b/drivers/gpu/pvr/sgxinit.c +index be7fa0f..ace786c 100644 +--- a/drivers/gpu/pvr/sgxinit.c ++++ b/drivers/gpu/pvr/sgxinit.c +@@ -124,11 +124,8 @@ static enum PVRSRV_ERROR InitDevInfo(struct PVRSRV_PER_PROCESS_DATA *psPerProc, + + psDevInfo->psKernelHWPerfCBMemInfo = + (struct PVRSRV_KERNEL_MEM_INFO *)psInitInfo->hKernelHWPerfCBMemInfo; +-#ifdef PVRSRV_USSE_EDM_STATUS_DEBUG + psDevInfo->psKernelEDMStatusBufferMemInfo = +- (struct PVRSRV_KERNEL_MEM_INFO *)psInitInfo-> +- hKernelEDMStatusBufferMemInfo; +-#endif ++ psInitInfo->hKernelEDMStatusBufferMemInfo; + + eError = OSAllocMem(PVRSRV_OS_PAGEABLE_HEAP, + sizeof(struct PVRSRV_SGX_CCB_INFO), +-- +1.7.5.4 + + +From 340898a61bd0f89390f64917f8df20310edf8247 Mon Sep 17 00:00:00 2001 +From: Imre Deak <imre.deak@nokia.com> +Date: Tue, 14 Dec 2010 03:04:33 +0200 +Subject: [PATCH 02/95] gpu: pvr: make the IOCTL i/f compatible for old ABI + users + +The previous patch breaks the IOCTL i/f for current user space code. +This change will notice such calls based on the IOCTL parameter size and +fix up the param struct accordingly. + +This patch can be reverted once applications are converted to use the new +ABI. + +Signed-off-by: Imre Deak <imre.deak@nokia.com> +--- + drivers/gpu/pvr/bridged_pvr_bridge.c | 2 +- + drivers/gpu/pvr/bridged_sgx_bridge.c | 39 ++++++++++++++++++++++++++++++++- + drivers/gpu/pvr/bridged_sgx_bridge.h | 6 ++-- + drivers/gpu/pvr/perproc.h | 5 ++++ + drivers/gpu/pvr/sgx_bridge_km.h | 3 +- + drivers/gpu/pvr/sgxinit.c | 10 ++++++-- + 6 files changed, 55 insertions(+), 10 deletions(-) + +diff --git a/drivers/gpu/pvr/bridged_pvr_bridge.c b/drivers/gpu/pvr/bridged_pvr_bridge.c +index 7409816..f95335f 100644 +--- a/drivers/gpu/pvr/bridged_pvr_bridge.c ++++ b/drivers/gpu/pvr/bridged_pvr_bridge.c +@@ -3225,7 +3225,7 @@ static int bridged_ioctl(struct file *filp, u32 cmd, void *in, void *out, + err = SGXGetInfoForSrvinitBW(cmd, in, out, per_proc); + break; + case PVRSRV_BRIDGE_SGX_DEVINITPART2: +- err = SGXDevInitPart2BW(cmd, in, out, per_proc); | ||
[-] [+] | Added | linux-2.6.38-TTY-Add-tty-ioctl-to-figure-device-node-of-the-syste.patch ^ |
@@ -0,0 +1,151 @@ +From 690dc39a473015c874ad1c39a50c6d6427cb3196 Mon Sep 17 00:00:00 2001 +From: Werner Fink <werner@suse.de> +Date: Fri, 3 Dec 2010 11:48:23 +0100 +Subject: [PATCH] TTY: Add tty ioctl to figure device node of the system console. + +TTY: Add tty ioctl to figure device node of the system console. + +This has been in the SuSE kernels for a very long time. + +Signed-off-by: Werner Fink <werner@suse.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + arch/alpha/include/asm/ioctls.h | 1 + + arch/mips/include/asm/ioctls.h | 1 + + arch/parisc/include/asm/ioctls.h | 1 + + arch/powerpc/include/asm/ioctls.h | 1 + + arch/sh/include/asm/ioctls.h | 1 + + arch/sparc/include/asm/ioctls.h | 1 + + arch/xtensa/include/asm/ioctls.h | 1 + + drivers/tty/tty_io.c | 5 +++++ + fs/compat_ioctl.c | 1 + + include/asm-generic/ioctls.h | 1 + + 10 files changed, 14 insertions(+), 0 deletions(-) + +diff --git a/arch/alpha/include/asm/ioctls.h b/arch/alpha/include/asm/ioctls.h +index 59617c3..034b6cf 100644 +--- a/arch/alpha/include/asm/ioctls.h ++++ b/arch/alpha/include/asm/ioctls.h +@@ -92,6 +92,7 @@ + #define TIOCGSID 0x5429 /* Return the session ID of FD */ + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ + + #define TIOCSERCONFIG 0x5453 +diff --git a/arch/mips/include/asm/ioctls.h b/arch/mips/include/asm/ioctls.h +index d87cb04..d967b89 100644 +--- a/arch/mips/include/asm/ioctls.h ++++ b/arch/mips/include/asm/ioctls.h +@@ -83,6 +83,7 @@ + #define TCSETSF2 _IOW('T', 0x2D, struct termios2) + #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */ + + /* I hope the range from 0x5480 on is free ... */ +diff --git a/arch/parisc/include/asm/ioctls.h b/arch/parisc/include/asm/ioctls.h +index 4e06144..6ba80d0 100644 +--- a/arch/parisc/include/asm/ioctls.h ++++ b/arch/parisc/include/asm/ioctls.h +@@ -52,6 +52,7 @@ + #define TCSETSF2 _IOW('T',0x2D, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ + + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ +diff --git a/arch/powerpc/include/asm/ioctls.h b/arch/powerpc/include/asm/ioctls.h +index 8519200..c7dc17c 100644 +--- a/arch/powerpc/include/asm/ioctls.h ++++ b/arch/powerpc/include/asm/ioctls.h +@@ -94,6 +94,7 @@ + #define TIOCSRS485 0x542f + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ + + #define TIOCSERCONFIG 0x5453 +diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/asm/ioctls.h +index eb6c4c6..84e85a7 100644 +--- a/arch/sh/include/asm/ioctls.h ++++ b/arch/sh/include/asm/ioctls.h +@@ -85,6 +85,7 @@ + #define TCSETSF2 _IOW('T', 45, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ + + #define TIOCSERCONFIG _IO('T', 83) /* 0x5453 */ +diff --git a/arch/sparc/include/asm/ioctls.h b/arch/sparc/include/asm/ioctls.h +index 53f4ee0..ed3807b 100644 +--- a/arch/sparc/include/asm/ioctls.h ++++ b/arch/sparc/include/asm/ioctls.h +@@ -19,6 +19,7 @@ + #define TCSETS2 _IOW('T', 13, struct termios2) + #define TCSETSW2 _IOW('T', 14, struct termios2) + #define TCSETSF2 _IOW('T', 15, struct termios2) ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ + + /* Note that all the ioctls that are not available in Linux have a + * double underscore on the front to: a) avoid some programs to +diff --git a/arch/xtensa/include/asm/ioctls.h b/arch/xtensa/include/asm/ioctls.h +index ab18000..ccf1800 100644 +--- a/arch/xtensa/include/asm/ioctls.h ++++ b/arch/xtensa/include/asm/ioctls.h +@@ -98,6 +98,7 @@ + #define TCSETSF2 _IOW('T', 45, struct termios2) + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */ + + #define TIOCSERCONFIG _IO('T', 83) +diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c +index cb9cb95..464d09d 100644 +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -2627,6 +2627,11 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + return put_user(tty->ldisc->ops->num, (int __user *)p); + case TIOCSETD: + return tiocsetd(tty, p); ++ case TIOCGDEV: ++ { ++ unsigned int ret = new_encode_dev(tty_devnum(real_tty)); ++ return put_user(ret, (unsigned int __user *)p); ++ } + /* + * Break handling + */ +diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c +index a60579b..ac3dca2 100644 +--- a/fs/compat_ioctl.c ++++ b/fs/compat_ioctl.c +@@ -836,6 +836,7 @@ COMPATIBLE_IOCTL(TCSETSW) + COMPATIBLE_IOCTL(TCSETSF) + COMPATIBLE_IOCTL(TIOCLINUX) + COMPATIBLE_IOCTL(TIOCSBRK) ++COMPATIBLE_IOCTL(TIOCGDEV) + COMPATIBLE_IOCTL(TIOCCBRK) + COMPATIBLE_IOCTL(TIOCGSID) + COMPATIBLE_IOCTL(TIOCGICOUNT) +diff --git a/include/asm-generic/ioctls.h b/include/asm-generic/ioctls.h +index a321665..3f3f2d1 100644 +--- a/include/asm-generic/ioctls.h ++++ b/include/asm-generic/ioctls.h +@@ -67,6 +67,7 @@ + #endif + #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ + #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ + #define TCSETX 0x5433 + #define TCSETXF 0x5434 +-- +1.7.4.1 + | ||
[-] [+] | Added | linux-2.6.38-input-touchscreen-introduce-tsc2005-driver.patch ^ |
@@ -0,0 +1,839 @@ +From c926242fa5ebabe51a90d6e70a479bb6774dad43 Mon Sep 17 00:00:00 2001 +From: Lauri Leukkunen <lauri.leukkunen@nokia.com> +Date: Fri, 12 Mar 2010 16:54:33 +0000 +Subject: [PATCH 08/42] input: touchscreen: introduce tsc2005 driver + +Patch-mainline: 2.6.38 +Discussions: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26748.html + +Introduce a driver for the Texas Instruments TSC2005 touchscreen +controller (http://focus.ti.com/docs/prod/folders/print/tsc2005.html). + +The patch is based on a driver by Lauri Leukkunen, with modifications +by David Brownell, Phil Carmody, Imre Deak, Hiroshi DOYU, Ari Kauppi, +Tony Lindgren, Jarkko Nikula, Eero Nurkkala and Roman Tereshonkov. + +Signed-off-by: Lauri Leukkunen <lauri.leukkunen@nokia.com> +[aaro.koskinen@nokia.com: patch description, rebasing & cleanup] +Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> +Cc: David Brownell <dbrownell@users.sourceforge.net> +Cc: Phil Carmody <ext-phil.2.carmody@nokia.com> +Cc: Imre Deak <imre.deak@nokia.com> +Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +Cc: Ari Kauppi <Ext-Ari.Kauppi@nokia.com> +Cc: Tony Lindgren <tony@atomide.com> +Cc: Jarkko Nikula <jhnikula@gmail.com> +Cc: Eero Nurkkala <ext-eero.nurkkala@nokia.com> +Cc: Roman Tereshonkov <roman.tereshonkov@nokia.com> +--- + drivers/input/touchscreen/Kconfig | 11 + + drivers/input/touchscreen/Makefile | 1 + + drivers/input/touchscreen/tsc2005.c | 713 +++++++++++++++++++++++++++++++++++ + include/linux/spi/tsc2005.h | 41 ++ + 4 files changed, 766 insertions(+), 0 deletions(-) + create mode 100644 drivers/input/touchscreen/tsc2005.c + create mode 100644 include/linux/spi/tsc2005.h + +diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig +index 06ea8da..30703ad 100644 +--- a/drivers/input/touchscreen/Kconfig ++++ b/drivers/input/touchscreen/Kconfig +@@ -629,6 +629,17 @@ config TOUCHSCREEN_TOUCHIT213 + To compile this driver as a module, choose M here: the + module will be called touchit213. + ++config TOUCHSCREEN_TSC2005 ++ tristate "TSC2005 based touchscreens" ++ depends on SPI_MASTER ++ help ++ Say Y here if you have a TSC2005 based touchscreen. ++ ++ If unsure, say N. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called tsc2005. ++ + config TOUCHSCREEN_TSC2007 + tristate "TSC2007 based touchscreens" + depends on I2C +diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile +index 7cc1b4f..34b26ad 100644 +--- a/drivers/input/touchscreen/Makefile ++++ b/drivers/input/touchscreen/Makefile +@@ -44,6 +44,7 @@ obj-$(CONFIG_TOUCHSCREEN_TNETV107X) += tnetv107x-ts.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o + obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o ++obj-$(CONFIG_TOUCHSCREEN_TSC2005) += tsc2005.o + obj-$(CONFIG_TOUCHSCREEN_TSC2007) += tsc2007.o + obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o + obj-$(CONFIG_TOUCHSCREEN_WACOM_W8001) += wacom_w8001.o +diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c +new file mode 100644 +index 0000000..2d18a53 +--- /dev/null ++++ b/drivers/input/touchscreen/tsc2005.c +@@ -0,0 +1,713 @@ ++/* ++ * TSC2005 touchscreen driver ++ * ++ * Copyright (C) 2006-2010 Nokia Corporation ++ * ++ * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> ++ * based on TSC2301 driver by Klaus K. Pedersen <klaus.k.pedersen@nokia.com> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#include <linux/kernel.h> ++#include <linux/module.h> ++#include <linux/input.h> ++#include <linux/interrupt.h> ++#include <linux/delay.h> ++#include <linux/spi/spi.h> ++#include <linux/spi/tsc2005.h> ++ ++/* ++ * The touchscreen interface operates as follows: ++ * ++ * 1) Pen is pressed against the touchscreen. ++ * 2) TSC2005 performs AD conversion. ++ * 3) After the conversion is done TSC2005 drives DAV line down. ++ * 4) GPIO IRQ is received and tsc2005_irq_thread() is scheduled. ++ * 5) tsc2005_irq_thread() queues up an spi transfer to fetch the x, y, z1, z2 ++ * values. ++ * 6) tsc2005_irq_thread() reports coordinates to input layer and sets up ++ * tsc2005_penup_timer() to be called after TSC2005_PENUP_TIME_MS (40ms). ++ * 7) When the penup timer expires, there have not been touch or DAV interrupts ++ * during the last 40ms which means the pen has been lifted. ++ * ++ * ESD recovery via a hardware reset is done if the TSC2005 doesn't respond ++ * after a configurable period (in ms) of activity. If esd_timeout is 0, the ++ * watchdog is disabled. ++ */ ++ ++/* control byte 1 */ ++#define TSC2005_CMD 0x80 ++#define TSC2005_CMD_NORMAL 0x00 ++#define TSC2005_CMD_STOP 0x01 ++#define TSC2005_CMD_12BIT 0x04 ++ ++/* control byte 0 */ ++#define TSC2005_REG_READ 0x0001 ++#define TSC2005_REG_PND0 0x0002 ++#define TSC2005_REG_X 0x0000 ++#define TSC2005_REG_Y 0x0008 ++#define TSC2005_REG_Z1 0x0010 ++#define TSC2005_REG_Z2 0x0018 ++#define TSC2005_REG_TEMP_HIGH 0x0050 ++#define TSC2005_REG_CFR0 0x0060 ++#define TSC2005_REG_CFR1 0x0068 ++#define TSC2005_REG_CFR2 0x0070 ++ ++/* configuration register 0 */ ++#define TSC2005_CFR0_PRECHARGE_276US 0x0040 ++#define TSC2005_CFR0_STABTIME_1MS 0x0300 ++#define TSC2005_CFR0_CLOCK_1MHZ 0x1000 ++#define TSC2005_CFR0_RESOLUTION12 0x2000 ++#define TSC2005_CFR0_PENMODE 0x8000 ++#define TSC2005_CFR0_INITVALUE (TSC2005_CFR0_STABTIME_1MS | \ ++ TSC2005_CFR0_CLOCK_1MHZ | \ ++ TSC2005_CFR0_RESOLUTION12 | \ ++ TSC2005_CFR0_PRECHARGE_276US | \ ++ TSC2005_CFR0_PENMODE) ++ ++/* bits common to both read and write of configuration register 0 */ ++#define TSC2005_CFR0_RW_MASK 0x3fff ++ ++/* configuration register 1 */ ++#define TSC2005_CFR1_BATCHDELAY_4MS 0x0003 ++#define TSC2005_CFR1_INITVALUE TSC2005_CFR1_BATCHDELAY_4MS ++ ++/* configuration register 2 */ ++#define TSC2005_CFR2_MAVE_Z 0x0004 ++#define TSC2005_CFR2_MAVE_Y 0x0008 ++#define TSC2005_CFR2_MAVE_X 0x0010 ++#define TSC2005_CFR2_AVG_7 0x0800 ++#define TSC2005_CFR2_MEDIUM_15 0x3000 ++#define TSC2005_CFR2_INITVALUE (TSC2005_CFR2_MAVE_X | \ ++ TSC2005_CFR2_MAVE_Y | \ ++ TSC2005_CFR2_MAVE_Z | \ ++ TSC2005_CFR2_MEDIUM_15 | \ ++ TSC2005_CFR2_AVG_7) ++ ++#define MAX_12BIT 0xfff ++#define TSC2005_SPI_MAX_SPEED_HZ 10000000 ++#define TSC2005_PENUP_TIME_MS 40 ++ ++struct tsc2005_spi_rd { ++ struct spi_transfer spi_xfer; ++ u32 spi_tx; ++ u32 spi_rx; ++}; ++ ++struct tsc2005 { ++ struct spi_device *spi; ++ ++ struct spi_message spi_read_msg; ++ struct tsc2005_spi_rd spi_x; ++ struct tsc2005_spi_rd spi_y; ++ struct tsc2005_spi_rd spi_z1; ++ struct tsc2005_spi_rd spi_z2; ++ ++ struct input_dev *idev; ++ char phys[32]; ++ ++ struct mutex mutex; | ||
[-] [+] | Added | linux-2.6.38-omap-rx-51-enable-tsc2005.patch ^ |
@@ -0,0 +1,115 @@ +From 3ddaaa4f9ac7abc4c4e2812e5c5e7cd072f4cd33 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen <Aaro.Koskinen@nokia.com> +Date: Fri, 12 Mar 2010 16:54:34 +0000 +Subject: [PATCH 09/42] omap: rx-51: enable tsc2005 + +Patch-mainline: 2.6.38 +Discussions: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg26749.html + +Enable TSC2005 touchscreen driver on the RX-51 board. + +[Ameya Palande: Removed rx51_defconfig modification] + +Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> +Signed-off-by: Ameya Palande <ameya.palande@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 46 ++++++++++++++++++++++++- + 1 files changed, 44 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 3fec4d6..e56d6d7 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -15,6 +15,7 @@ + #include <linux/input/matrix_keypad.h> + #include <linux/spi/spi.h> + #include <linux/wl12xx.h> ++#include <linux/spi/tsc2005.h> + #include <linux/i2c.h> + #include <linux/i2c/twl.h> + #include <linux/clk.h> +@@ -49,6 +50,9 @@ + #define RX51_WL1251_POWER_GPIO 87 + #define RX51_WL1251_IRQ_GPIO 42 + ++#define RX51_TSC2005_RESET_GPIO 104 ++#define RX51_TSC2005_IRQ_GPIO 100 ++ + /* list all spi devices here */ + enum { + RX51_SPI_WL1251, +@@ -57,6 +61,7 @@ enum { + }; + + static struct wl12xx_platform_data wl1251_pdata; ++static struct tsc2005_platform_data tsc2005_pdata; + + #if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) + static struct tsl2563_platform_data rx51_tsl2563_platform_data = { +@@ -100,10 +105,10 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { + .modalias = "tsc2005", + .bus_num = 1, + .chip_select = 0, +- /* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/ ++ .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO), + .max_speed_hz = 6000000, + .controller_data = &tsc2005_mcspi_config, +- /* .platform_data = &tsc2005_config,*/ ++ .platform_data = &tsc2005_pdata, + }, + }; + +@@ -836,6 +841,42 @@ static inline void board_onenand_init(void) + + #endif + ++static struct tsc2005_platform_data tsc2005_pdata = { ++ .ts_pressure_max = 2048, ++ .ts_pressure_fudge = 2, ++ .ts_x_max = 4096, ++ .ts_x_fudge = 4, ++ .ts_y_max = 4096, ++ .ts_y_fudge = 7, ++ .ts_x_plate_ohm = 280, ++ .esd_timeout_ms = 8000, ++}; ++ ++static void rx51_tsc2005_set_reset(bool enable) ++{ ++ gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); ++} ++ ++static void __init rx51_init_tsc2005(void) ++{ ++ int r; ++ ++ r = gpio_request(RX51_TSC2005_IRQ_GPIO, "tsc2005 IRQ"); ++ if (r >= 0) ++ gpio_direction_input(RX51_TSC2005_IRQ_GPIO); ++ else ++ printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ"); ++ ++ r = gpio_request(RX51_TSC2005_RESET_GPIO, "tsc2005 reset"); ++ if (r >= 0) { ++ gpio_direction_output(RX51_TSC2005_RESET_GPIO, 1); ++ tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; ++ } else { ++ printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset"); ++ tsc2005_pdata.esd_timeout_ms = 0; ++ } ++} ++ + #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) + + static struct omap_smc91x_platform_data board_smc91x_data = { +@@ -920,6 +961,7 @@ void __init rx51_peripherals_init(void) + board_smc91x_init(); + rx51_add_gpio_keys(); + rx51_init_wl1251(); ++ rx51_init_tsc2005(); + spi_register_board_info(rx51_peripherals_spi_board_info, + ARRAY_SIZE(rx51_peripherals_spi_board_info)); + omap2_hsmmc_init(mmc); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-sr-0001-OMAP3-PM-Adding-voltage-driver-support.patch ^ |
@@ -0,0 +1,1492 @@ +From 3a9d70c45a67bf3ca6e39c4930755fb1ce8305a9 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:21 +0530 +Subject: [PATCH 01/32] OMAP3: PM: Adding voltage driver support. + +This patch adds voltage driver support for OMAP3. The driver +allows configuring the voltage controller and voltage +processors during init and exports APIs to enable/disable +voltage processors, scale voltage and reset voltage. +The driver maintains the global voltage table on a per +VDD basis which contains the various voltages supported by the +VDD along with per voltage dependent data like smartreflex +efuse offset, errminlimit and voltage processor errorgain. +The driver also allows the voltage parameters dependent on the +PMIC to be passed from the PMIC file through an API. +The driver allows scaling of VDD voltages either through +"vc bypass method" or through "vp forceupdate method" the +choice being configurable through the board file. + +This patch contains code originally in linux omap pm branch +smartreflex driver. Major contributors to this driver are +Lesly A M, Rajendra Nayak, Kalle Jokiniemi, Paul Walmsley, +Nishant Menon, Kevin Hilman. The separation of PMIC parameters +into a separate structure which can be populated from +the PMIC file is based on the work of Lun Chang from Motorola +in an internal tree. + +Signed-off-by: Thara Gopinath <thara@ti.com> +[khilman: fixed link error for OMAP2-only defconfig] +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +[jhnikula@gmail.com: omap2_prm_read_mod_reg/omap2_prm_write_mod_reg replaced +with prm_read_mod_reg/prm_write_mod_reg as a patch converting them is not in +2.6.37] +--- + arch/arm/mach-omap2/Makefile | 5 +- + arch/arm/mach-omap2/control.h | 17 + + arch/arm/mach-omap2/pm.c | 8 + + arch/arm/mach-omap2/voltage.c | 1226 +++++++++++++++++++++++++++++ + arch/arm/plat-omap/include/plat/voltage.h | 134 ++++ + 5 files changed, 1388 insertions(+), 2 deletions(-) + create mode 100644 arch/arm/mach-omap2/voltage.c + create mode 100644 arch/arm/plat-omap/include/plat/voltage.h + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 75136bc..d022bf3 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -50,8 +50,9 @@ obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o + # Power Management + ifeq ($(CONFIG_PM),y) + obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o +-obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o +-obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o cpuidle34xx.o pm_bus.o ++obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o voltage.o ++obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ ++ cpuidle34xx.o pm_bus.o + obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o + obj-$(CONFIG_PM_DEBUG) += pm-debug.o + +diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h +index db0515f..cb5ae83 100644 +--- a/arch/arm/mach-omap2/control.h ++++ b/arch/arm/mach-omap2/control.h +@@ -148,6 +148,15 @@ + #define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4) + #define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8) + #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) ++#define OMAP343X_CONTROL_FUSE_OPP1_VDD1 (OMAP2_CONTROL_GENERAL + 0x0110) ++#define OMAP343X_CONTROL_FUSE_OPP2_VDD1 (OMAP2_CONTROL_GENERAL + 0x0114) ++#define OMAP343X_CONTROL_FUSE_OPP3_VDD1 (OMAP2_CONTROL_GENERAL + 0x0118) ++#define OMAP343X_CONTROL_FUSE_OPP4_VDD1 (OMAP2_CONTROL_GENERAL + 0x011c) ++#define OMAP343X_CONTROL_FUSE_OPP5_VDD1 (OMAP2_CONTROL_GENERAL + 0x0120) ++#define OMAP343X_CONTROL_FUSE_OPP1_VDD2 (OMAP2_CONTROL_GENERAL + 0x0124) ++#define OMAP343X_CONTROL_FUSE_OPP2_VDD2 (OMAP2_CONTROL_GENERAL + 0x0128) ++#define OMAP343X_CONTROL_FUSE_OPP3_VDD2 (OMAP2_CONTROL_GENERAL + 0x012c) ++#define OMAP343X_CONTROL_FUSE_SR (OMAP2_CONTROL_GENERAL + 0x0130) + #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) + #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) + #define OMAP343X_CONTROL_DEBOBS(i) (OMAP2_CONTROL_GENERAL + 0x01B0 \ +@@ -164,6 +173,14 @@ + #define OMAP343X_CONTROL_SRAMLDO5 (OMAP2_CONTROL_GENERAL + 0x02C0) + #define OMAP343X_CONTROL_CSI (OMAP2_CONTROL_GENERAL + 0x02C4) + ++/* OMAP3630 only CONTROL_GENERAL register offsets */ ++#define OMAP3630_CONTROL_FUSE_OPP1G_VDD1 (OMAP2_CONTROL_GENERAL + 0x0110) ++#define OMAP3630_CONTROL_FUSE_OPP50_VDD1 (OMAP2_CONTROL_GENERAL + 0x0114) ++#define OMAP3630_CONTROL_FUSE_OPP100_VDD1 (OMAP2_CONTROL_GENERAL + 0x0118) ++#define OMAP3630_CONTROL_FUSE_OPP120_VDD1 (OMAP2_CONTROL_GENERAL + 0x0120) ++#define OMAP3630_CONTROL_FUSE_OPP50_VDD2 (OMAP2_CONTROL_GENERAL + 0x0128) ++#define OMAP3630_CONTROL_FUSE_OPP100_VDD2 (OMAP2_CONTROL_GENERAL + 0x012C) ++ + /* AM35XX only CONTROL_GENERAL register offsets */ + #define AM35XX_CONTROL_MSUSPENDMUX_6 (OMAP2_CONTROL_GENERAL + 0x0038) + #define AM35XX_CONTROL_DEVCONF2 (OMAP2_CONTROL_GENERAL + 0x0310) +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index 59ca03b..0b3799d 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -17,6 +17,7 @@ + #include <plat/omap-pm.h> + #include <plat/omap_device.h> + #include <plat/common.h> ++#include <plat/voltage.h> + + #include <plat/powerdomain.h> + #include <plat/clockdomain.h> +@@ -145,3 +146,10 @@ static int __init omap2_common_pm_init(void) + } + device_initcall(omap2_common_pm_init); + ++static int __init omap2_common_pm_late_init(void) ++{ ++ omap_voltage_late_init(); ++ ++ return 0; ++} ++late_initcall(omap2_common_pm_late_init); +diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c +new file mode 100644 +index 0000000..8dac2df +--- /dev/null ++++ b/arch/arm/mach-omap2/voltage.c +@@ -0,0 +1,1226 @@ ++/* ++ * OMAP3/OMAP4 Voltage Management Routines ++ * ++ * Author: Thara Gopinath <thara@ti.com> ++ * ++ * Copyright (C) 2007 Texas Instruments, Inc. ++ * Rajendra Nayak <rnayak@ti.com> ++ * Lesly A M <x0080970@ti.com> ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Kalle Jokiniemi ++ * ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Thara Gopinath <thara@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/delay.h> ++#include <linux/io.h> ++#include <linux/clk.h> ++#include <linux/err.h> ++#include <linux/debugfs.h> ++#include <linux/slab.h> ++ ++#include <plat/common.h> ++#include <plat/voltage.h> ++ ++#include "prm-regbits-34xx.h" ++#include "control.h" ++ ++#define VP_IDLE_TIMEOUT 200 ++#define VP_TRANXDONE_TIMEOUT 300 ++#define VOLTAGE_DIR_SIZE 16 ++ ++/* Voltage processor register offsets */ ++struct vp_reg_offs { ++ u8 vpconfig; ++ u8 vstepmin; ++ u8 vstepmax; ++ u8 vlimitto; ++ u8 vstatus; ++ u8 voltage; ++}; ++ ++/* Voltage Processor bit field values, shifts and masks */ ++struct vp_reg_val { ++ /* PRM module */ ++ u16 prm_mod; ++ /* VPx_VPCONFIG */ ++ u32 vpconfig_erroroffset; ++ u16 vpconfig_errorgain; ++ u32 vpconfig_errorgain_mask; ++ u8 vpconfig_errorgain_shift; ++ u32 vpconfig_initvoltage_mask; ++ u8 vpconfig_initvoltage_shift; ++ u32 vpconfig_timeouten; ++ u32 vpconfig_initvdd; ++ u32 vpconfig_forceupdate; ++ u32 vpconfig_vpenable; ++ /* VPx_VSTEPMIN */ ++ u8 vstepmin_stepmin; ++ u16 vstepmin_smpswaittimemin; ++ u8 vstepmin_stepmin_shift; ++ u8 vstepmin_smpswaittimemin_shift; ++ /* VPx_VSTEPMAX */ ++ u8 vstepmax_stepmax; ++ u16 vstepmax_smpswaittimemax; ++ u8 vstepmax_stepmax_shift; ++ u8 vstepmax_smpswaittimemax_shift; ++ /* VPx_VLIMITTO */ ++ u8 vlimitto_vddmin; ++ u8 vlimitto_vddmax; ++ u16 vlimitto_timeout; | ||
[-] [+] | Added | linux-2.6.38-sr-0002-OMAP-Introduce-voltage-domain-information-in-the-hwm.patch ^ |
@@ -0,0 +1,49 @@ +From 94b3b2a7e5ee026b89e7699f742a3a88288ae9c9 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Wed, 18 Aug 2010 16:21:58 +0530 +Subject: [PATCH 02/32] OMAP: Introduce voltage domain information in the hwmod structures + +This patch extends the device hwmod structure to contain +info about the voltage domain to which the device belongs to. +This is needed to support a device based DVFS where the +device knows which voltage domain it belongs to. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/plat-omap/include/plat/omap_hwmod.h | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h +index 7eaa8ed..9567aee 100644 +--- a/arch/arm/plat-omap/include/plat/omap_hwmod.h ++++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h +@@ -34,6 +34,7 @@ + #include <linux/ioport.h> + #include <linux/mutex.h> + #include <plat/cpu.h> ++#include <plat/voltage.h> + + struct omap_device; + +@@ -436,6 +437,8 @@ struct omap_hwmod_class { + * @main_clk: main clock: OMAP clock name + * @_clk: pointer to the main struct clk (filled in at runtime) + * @opt_clks: other device clocks that drivers can request (0..*) ++ * @vdd_name: voltage domain name ++ * @voltdm: pointer to voltage domain (filled in at runtime) + * @masters: ptr to array of OCP ifs that this hwmod can initiate on + * @slaves: ptr to array of OCP ifs that this hwmod can respond on + * @dev_attr: arbitrary device attributes that can be passed to the driver +@@ -479,6 +482,8 @@ struct omap_hwmod { + const char *main_clk; + struct clk *_clk; + struct omap_hwmod_opt_clk *opt_clks; ++ char *vdd_name; ++ struct voltagedomain *voltdm; + struct omap_hwmod_ocp_if **masters; /* connect to *_IA */ + struct omap_hwmod_ocp_if **slaves; /* connect to *_TA */ + void *dev_attr; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-sr-0003-OMAP3-PM-Adding-smartreflex-driver-support.patch ^ |
@@ -0,0 +1,1337 @@ +From 58a0f44fc5a46a63c1dd4c3b38e9cd58e71da13c Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:22 +0530 +Subject: [PATCH 03/32] OMAP3: PM: Adding smartreflex driver support. + +SmartReflex modules do adaptive voltage control for real-time +voltage adjustments. With Smartreflex the power supply voltage +can be adapted to the silicon performance(manufacturing process, +temperature induced performance, age induced performance etc). + +There are differnet classes of smartreflex implementation. + Class-0: Manufacturing Test Calibration + Class-1: Boot-Time Software Calibration + Class-2: Continuous Software Calibration + Class-3: Continuous Hardware Calibration + Class-4: Fully Integrated Power Management + +OMAP3 has two smartreflex modules one associated with VDD MPU and the +other associated with VDD CORE. +This patch adds support for smartreflex driver. The driver is designed +for Class-1 , Class-2 and Class-3 support and is a platform driver. +Smartreflex driver can be enabled through a Kconfig option +"SmartReflex support" under "System type"->"TI OMAP implementations" menu. + +Smartreflex autocompensation feature can be enabled runtime through +a debug fs option. +To enable smartreflex autocompensation feature + echo 1 > /debug/voltage/vdd_<X>/smartreflex/autocomp +To disable smartreflex autocompensation feature + echo 0 > /debug/voltage/vdd_<X>/smartreflex/autocomp + +where X can be mpu, core , iva etc. + +This patch contains code originally in linux omap pm branch. +Major contributors to this driver are +Lesly A M, Rajendra Nayak, Kalle Jokiniemi, Paul Walmsley, +Nishant Menon, Kevin Hilman. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/mach-omap2/Makefile | 1 + + arch/arm/mach-omap2/smartreflex.c | 983 +++++++++++++++++++++++++ + arch/arm/plat-omap/Kconfig | 22 + + arch/arm/plat-omap/include/plat/smartreflex.h | 245 ++++++ + 4 files changed, 1251 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/smartreflex.c + create mode 100644 arch/arm/plat-omap/include/plat/smartreflex.h + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index d022bf3..c66d041 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -55,6 +55,7 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ + cpuidle34xx.o pm_bus.o + obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o + obj-$(CONFIG_PM_DEBUG) += pm-debug.o ++obj-$(CONFIG_OMAP_SMARTREFLEX) += smartreflex.o + + AFLAGS_sleep24xx.o :=-Wa,-march=armv6 + AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +new file mode 100644 +index 0000000..eee23d0 +--- /dev/null ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -0,0 +1,983 @@ ++/* ++ * OMAP SmartReflex Voltage Control ++ * ++ * Author: Thara Gopinath <thara@ti.com> ++ * ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Thara Gopinath <thara@ti.com> ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Kalle Jokiniemi ++ * ++ * Copyright (C) 2007 Texas Instruments, Inc. ++ * Lesly A M <x0080970@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/interrupt.h> ++#include <linux/clk.h> ++#include <linux/io.h> ++#include <linux/debugfs.h> ++#include <linux/delay.h> ++#include <linux/slab.h> ++#include <linux/pm_runtime.h> ++ ++#include <plat/common.h> ++#include <plat/smartreflex.h> ++ ++#include "pm.h" ++ ++#define SMARTREFLEX_NAME_LEN 16 ++#define SR_DISABLE_TIMEOUT 200 ++ ++struct omap_sr { ++ int srid; ++ int ip_type; ++ int nvalue_count; ++ bool autocomp_active; ++ u32 clk_length; ++ u32 err_weight; ++ u32 err_minlimit; ++ u32 err_maxlimit; ++ u32 accum_data; ++ u32 senn_avgweight; ++ u32 senp_avgweight; ++ u32 senp_mod; ++ u32 senn_mod; ++ unsigned int irq; ++ void __iomem *base; ++ struct platform_device *pdev; ++ struct list_head node; ++ struct omap_sr_nvalue_table *nvalue_table; ++ struct voltagedomain *voltdm; ++}; ++ ++/* sr_list contains all the instances of smartreflex module */ ++static LIST_HEAD(sr_list); ++ ++static struct omap_sr_class_data *sr_class; ++static struct omap_sr_pmic_data *sr_pmic_data; ++ ++static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value) ++{ ++ __raw_writel(value, (sr->base + offset)); ++} ++ ++static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask, ++ u32 value) ++{ ++ u32 reg_val; ++ u32 errconfig_offs = 0, errconfig_mask = 0; ++ ++ reg_val = __raw_readl(sr->base + offset); ++ reg_val &= ~mask; ++ ++ /* ++ * Smartreflex error config register is special as it contains ++ * certain status bits which if written a 1 into means a clear ++ * of those bits. So in order to make sure no accidental write of ++ * 1 happens to those status bits, do a clear of them in the read ++ * value. This mean this API doesn't rewrite values in these bits ++ * if they are currently set, but does allow the caller to write ++ * those bits. ++ */ ++ if (sr->ip_type == SR_TYPE_V1) { ++ errconfig_offs = ERRCONFIG_V1; ++ errconfig_mask = ERRCONFIG_STATUS_V1_MASK; ++ } else if (sr->ip_type == SR_TYPE_V2) { ++ errconfig_offs = ERRCONFIG_V2; ++ errconfig_mask = ERRCONFIG_VPBOUNDINTST_V2; ++ } ++ ++ if (offset == errconfig_offs) ++ reg_val &= ~errconfig_mask; ++ ++ reg_val |= value; ++ ++ __raw_writel(reg_val, (sr->base + offset)); ++} ++ ++static inline u32 sr_read_reg(struct omap_sr *sr, unsigned offset) ++{ ++ return __raw_readl(sr->base + offset); ++} ++ ++static struct omap_sr *_sr_lookup(struct voltagedomain *voltdm) ++{ ++ struct omap_sr *sr_info; ++ ++ if (!voltdm) { ++ pr_err("%s: Null voltage domain passed!\n", __func__); ++ return ERR_PTR(-EINVAL); ++ } ++ ++ list_for_each_entry(sr_info, &sr_list, node) { ++ if (voltdm == sr_info->voltdm) ++ return sr_info; ++ } ++ ++ return ERR_PTR(-ENODATA); ++} ++ ++static irqreturn_t sr_interrupt(int irq, void *data) ++{ ++ struct omap_sr *sr_info = (struct omap_sr *)data; ++ u32 status = 0; ++ ++ if (sr_info->ip_type == SR_TYPE_V1) { ++ /* Read the status bits */ ++ status = sr_read_reg(sr_info, ERRCONFIG_V1); | ||
[-] [+] | Added | linux-2.6.38-sr-0004-OMAP3-PM-Adding-smartreflex-device-file.patch ^ |
@@ -0,0 +1,229 @@ +From 9145bdc6952b64f74aa44d2eb72da11cac35b9d3 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:23 +0530 +Subject: [PATCH 04/32] OMAP3: PM: Adding smartreflex device file. + +This patch adds support for device registration of various +smartreflex module present in the system. This patch introduces +the platform data for smartreflex devices which include +the efused n-target vaules, a parameter to indicate +whether smartreflex autocompensation needs to be +enabled on init or not. An API +omap_enable_smartreflex_on_init is provided for the +board files to enable smartreflex autocompensation during +system boot up. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +[jhnikula@gmail.com: resolved conflicts in pm.h and pm.c] +--- + arch/arm/mach-omap2/Makefile | 2 +- + arch/arm/mach-omap2/pm.c | 2 + + arch/arm/mach-omap2/pm.h | 14 ++++ + arch/arm/mach-omap2/sr_device.c | 131 +++++++++++++++++++++++++++++++++++++++ + 4 files changed, 148 insertions(+), 1 deletions(-) + create mode 100644 arch/arm/mach-omap2/sr_device.c + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index c66d041..29bd467 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -55,7 +55,7 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ + cpuidle34xx.o pm_bus.o + obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o + obj-$(CONFIG_PM_DEBUG) += pm-debug.o +-obj-$(CONFIG_OMAP_SMARTREFLEX) += smartreflex.o ++obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o + + AFLAGS_sleep24xx.o :=-Wa,-march=armv6 + AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index 0b3799d..5a6fa1b 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -21,6 +21,7 @@ + + #include <plat/powerdomain.h> + #include <plat/clockdomain.h> ++#include "pm.h" + + static struct omap_device_pm_latency *pm_lats; + +@@ -149,6 +150,7 @@ device_initcall(omap2_common_pm_init); + static int __init omap2_common_pm_late_init(void) + { + omap_voltage_late_init(); ++ omap_devinit_smartreflex(); + + return 0; + } +diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h +index 0d75bfd..41dfd68 100644 +--- a/arch/arm/mach-omap2/pm.h ++++ b/arch/arm/mach-omap2/pm.h +@@ -11,6 +11,8 @@ + #ifndef __ARCH_ARM_MACH_OMAP2_PM_H + #define __ARCH_ARM_MACH_OMAP2_PM_H + ++#include <linux/err.h> ++ + #include <plat/powerdomain.h> + + extern void *omap3_secure_ram_storage; +@@ -85,4 +87,16 @@ extern unsigned int save_secure_ram_context_sz; + extern unsigned int omap24xx_cpu_suspend_sz; + extern unsigned int omap34xx_cpu_suspend_sz; + ++#ifdef CONFIG_OMAP_SMARTREFLEX ++extern int omap_devinit_smartreflex(void); ++extern void omap_enable_smartreflex_on_init(void); ++#else ++static inline int omap_devinit_smartreflex(void) ++{ ++ return -EINVAL; ++} ++ ++static inline void omap_enable_smartreflex_on_init(void) {} ++#endif ++ + #endif +diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c +new file mode 100644 +index 0000000..9a3538f +--- /dev/null ++++ b/arch/arm/mach-omap2/sr_device.c +@@ -0,0 +1,131 @@ ++/* ++ * OMAP3/OMAP4 smartreflex device file ++ * ++ * Author: Thara Gopinath <thara@ti.com> ++ * ++ * Based originally on code from smartreflex.c ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Thara Gopinath <thara@ti.com> ++ * ++ * Copyright (C) 2008 Nokia Corporation ++ * Kalle Jokiniemi ++ * ++ * Copyright (C) 2007 Texas Instruments, Inc. ++ * Lesly A M <x0080970@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/err.h> ++#include <linux/slab.h> ++ ++#include <plat/omap_device.h> ++#include <plat/smartreflex.h> ++#include <plat/voltage.h> ++ ++#include "control.h" ++ ++static bool sr_enable_on_init; ++ ++static struct omap_device_pm_latency omap_sr_latency[] = { ++ { ++ .deactivate_func = omap_device_idle_hwmods, ++ .activate_func = omap_device_enable_hwmods, ++ .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST ++ }, ++}; ++ ++/* Read EFUSE values from control registers for OMAP3430 */ ++static void __init sr_set_nvalues(struct omap_volt_data *volt_data, ++ struct omap_sr_data *sr_data) ++{ ++ struct omap_sr_nvalue_table *nvalue_table; ++ int i, count = 0; ++ ++ while (volt_data[count].volt_nominal) ++ count++; ++ ++ nvalue_table = kzalloc(sizeof(struct omap_sr_nvalue_table)*count, ++ GFP_KERNEL); ++ ++ for (i = 0; i < count; i++) { ++ u32 v = omap_ctrl_readl(volt_data[i].sr_efuse_offs); ++ ++ nvalue_table[i].efuse_offs = volt_data[i].sr_efuse_offs; ++ nvalue_table[i].nvalue = v; ++ } ++ ++ sr_data->nvalue_table = nvalue_table; ++ sr_data->nvalue_count = count; ++} ++ ++static int sr_dev_init(struct omap_hwmod *oh, void *user) ++{ ++ struct omap_sr_data *sr_data; ++ struct omap_device *od; ++ struct omap_volt_data *volt_data; ++ char *name = "smartreflex"; ++ static int i; ++ ++ sr_data = kzalloc(sizeof(struct omap_sr_data), GFP_KERNEL); ++ if (!sr_data) { ++ pr_err("%s: Unable to allocate memory for %s sr_data.Error!\n", ++ __func__, oh->name); ++ return -ENOMEM; ++ } ++ ++ if (!oh->vdd_name) { ++ pr_err("%s: No voltage domain specified for %s." ++ "Cannot initialize\n", __func__, oh->name); ++ goto exit; ++ } ++ ++ sr_data->ip_type = oh->class->rev; ++ sr_data->senn_mod = 0x1; ++ sr_data->senp_mod = 0x1; ++ ++ sr_data->voltdm = omap_voltage_domain_lookup(oh->vdd_name); ++ if (IS_ERR(sr_data->voltdm)) { ++ pr_err("%s: Unable to get voltage domain pointer for VDD %s\n", ++ __func__, oh->vdd_name); ++ goto exit; ++ } ++ ++ omap_voltage_get_volttable(sr_data->voltdm, &volt_data); ++ if (!volt_data) { ++ pr_warning("%s: No Voltage table registerd fo VDD%d." ++ "Something really wrong\n\n", __func__, i + 1); ++ goto exit; ++ } ++ ++ sr_set_nvalues(volt_data, sr_data); ++ | ||
[-] [+] | Added | linux-2.6.38-sr-0005-OMAP3-PM-Adding-smartreflex-hwmod-data.patch ^ |
@@ -0,0 +1,234 @@ +From ce213539f0718fade4f1825af7efb886805961ba Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:24 +0530 +Subject: [PATCH 05/32] OMAP3: PM: Adding smartreflex hwmod data + +This patch adds the smartreflex hwmod data for OMAP3430 +and OMAP3630. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +[jhnikula@gmail.com: Applying manually rejects in omap_hwmod_3xxx_data.c] +--- + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 174 ++++++++++++++++++++++++++++ + 1 files changed, 174 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +index c5b24d0..f780279 100644 +--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c ++++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +@@ -18,6 +18,7 @@ + #include <plat/cpu.h> + #include <plat/dma.h> + #include <plat/serial.h> ++#include <plat/smartreflex.h> + + #include "omap_hwmod_common_data.h" + +@@ -39,6 +40,8 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod; + static struct omap_hwmod omap3xxx_l4_core_hwmod; + static struct omap_hwmod omap3xxx_l4_per_hwmod; + static struct omap_hwmod omap3xxx_wd_timer2_hwmod; ++static struct omap_hwmod omap34xx_sr1_hwmod; ++static struct omap_hwmod omap34xx_sr2_hwmod; + + /* L3 -> L4_CORE interface */ + static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_core = { +@@ -169,9 +172,47 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { + .user = OCP_USER_MPU | OCP_USER_SDMA, + }; + ++/* L4 CORE -> SR1 interface */ ++static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = { ++ { ++ .pa_start = OMAP34XX_SR1_BASE, ++ .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, ++ .flags = ADDR_TYPE_RT, ++ }, ++}; ++ ++static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { ++ .master = &omap3xxx_l4_core_hwmod, ++ .slave = &omap34xx_sr1_hwmod, ++ .clk = "sr_l4_ick", ++ .addr = omap3_sr1_addr_space, ++ .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space), ++ .user = OCP_USER_MPU, ++}; ++ ++/* L4 CORE -> SR1 interface */ ++static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = { ++ { ++ .pa_start = OMAP34XX_SR2_BASE, ++ .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, ++ .flags = ADDR_TYPE_RT, ++ }, ++}; ++ ++static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { ++ .master = &omap3xxx_l4_core_hwmod, ++ .slave = &omap34xx_sr2_hwmod, ++ .clk = "sr_l4_ick", ++ .addr = omap3_sr2_addr_space, ++ .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space), ++ .user = OCP_USER_MPU, ++}; ++ + /* Slave interfaces on the L4_CORE interconnect */ + static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { + &omap3xxx_l3_main__l4_core, ++ &omap3_l4_core__sr1, ++ &omap3_l4_core__sr2, + }; + + /* Master interfaces on the L4_CORE interconnect */ +@@ -514,6 +555,135 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), + }; + ++/* SR common */ ++static struct omap_hwmod_sysc_fields omap34xx_sr_sysc_fields = { ++ .clkact_shift = 20, ++}; ++ ++static struct omap_hwmod_class_sysconfig omap34xx_sr_sysc = { ++ .sysc_offs = 0x24, ++ .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_NO_CACHE), ++ .clockact = CLOCKACT_TEST_ICLK, ++ .sysc_fields = &omap34xx_sr_sysc_fields, ++}; ++ ++static struct omap_hwmod_class omap34xx_smartreflex_hwmod_class = { ++ .name = "smartreflex", ++ .sysc = &omap34xx_sr_sysc, ++ .rev = 1, ++}; ++ ++static struct omap_hwmod_sysc_fields omap36xx_sr_sysc_fields = { ++ .sidle_shift = 24, ++ .enwkup_shift = 26 ++}; ++ ++static struct omap_hwmod_class_sysconfig omap36xx_sr_sysc = { ++ .sysc_offs = 0x38, ++ .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), ++ .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | ++ SYSC_NO_CACHE), ++ .sysc_fields = &omap36xx_sr_sysc_fields, ++}; ++ ++static struct omap_hwmod_class omap36xx_smartreflex_hwmod_class = { ++ .name = "smartreflex", ++ .sysc = &omap36xx_sr_sysc, ++ .rev = 2, ++}; ++ ++/* SR1 */ ++static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = { ++ &omap3_l4_core__sr1, ++}; ++ ++static struct omap_hwmod omap34xx_sr1_hwmod = { ++ .name = "sr1_hwmod", ++ .class = &omap34xx_smartreflex_hwmod_class, ++ .main_clk = "sr1_fck", ++ .vdd_name = "mpu", ++ .prcm = { ++ .omap2 = { ++ .prcm_reg_id = 1, ++ .module_bit = OMAP3430_EN_SR1_SHIFT, ++ .module_offs = WKUP_MOD, ++ .idlest_reg_id = 1, ++ .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, ++ }, ++ }, ++ .slaves = omap3_sr1_slaves, ++ .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves), ++ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 | ++ CHIP_IS_OMAP3430ES3_0 | ++ CHIP_IS_OMAP3430ES3_1), ++ .flags = HWMOD_SET_DEFAULT_CLOCKACT, ++}; ++ ++static struct omap_hwmod omap36xx_sr1_hwmod = { ++ .name = "sr1_hwmod", ++ .class = &omap36xx_smartreflex_hwmod_class, ++ .main_clk = "sr1_fck", ++ .vdd_name = "mpu", ++ .prcm = { ++ .omap2 = { ++ .prcm_reg_id = 1, ++ .module_bit = OMAP3430_EN_SR1_SHIFT, ++ .module_offs = WKUP_MOD, ++ .idlest_reg_id = 1, ++ .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT, ++ }, ++ }, ++ .slaves = omap3_sr1_slaves, ++ .slaves_cnt = ARRAY_SIZE(omap3_sr1_slaves), ++ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), ++}; ++ ++/* SR2 */ ++static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = { ++ &omap3_l4_core__sr2, ++}; ++ ++static struct omap_hwmod omap34xx_sr2_hwmod = { ++ .name = "sr2_hwmod", ++ .class = &omap34xx_smartreflex_hwmod_class, ++ .main_clk = "sr2_fck", ++ .vdd_name = "core", ++ .prcm = { ++ .omap2 = { ++ .prcm_reg_id = 1, ++ .module_bit = OMAP3430_EN_SR2_SHIFT, ++ .module_offs = WKUP_MOD, ++ .idlest_reg_id = 1, ++ .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT, ++ }, ++ }, ++ .slaves = omap3_sr2_slaves, ++ .slaves_cnt = ARRAY_SIZE(omap3_sr2_slaves), ++ .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES2 | ++ CHIP_IS_OMAP3430ES3_0 | ++ CHIP_IS_OMAP3430ES3_1), ++ .flags = HWMOD_SET_DEFAULT_CLOCKACT, ++}; ++ ++static struct omap_hwmod omap36xx_sr2_hwmod = { | ||
[-] [+] | Added | linux-2.6.38-sr-0006-OMAP3-PM-Adding-smartreflex-class3-driver.patch ^ |
@@ -0,0 +1,126 @@ +From 0e1ce39e52cc916a40a9e1043677e8a529df62e8 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:25 +0530 +Subject: [PATCH 06/32] OMAP3: PM: Adding smartreflex class3 driver + +Smartreflex Class3 implementation continuously monitors +silicon performance and instructs the Voltage Processors +to increase or decrease the voltage. +This patch adds smartreflex class 3 driver. This driver hooks +up with the generic smartreflex driver smartreflex.c to abstract +out class specific implementations out of the generic driver. + +Class3 driver is chosen as the default class driver for smartreflex. +If any other class driver needs to be implemented, the init of that +driver should be called from the board file. That way the new class driver +will over-ride the Class3 driver. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/mach-omap2/Makefile | 1 + + arch/arm/mach-omap2/smartreflex-class3.c | 59 ++++++++++++++++++++++++++++++ + arch/arm/plat-omap/Kconfig | 9 +++++ + 3 files changed, 69 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/smartreflex-class3.c + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 29bd467..194ee3b 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -56,6 +56,7 @@ obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ + obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o + obj-$(CONFIG_PM_DEBUG) += pm-debug.o + obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o ++obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o + + AFLAGS_sleep24xx.o :=-Wa,-march=armv6 + AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a +diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c +new file mode 100644 +index 0000000..60e7055 +--- /dev/null ++++ b/arch/arm/mach-omap2/smartreflex-class3.c +@@ -0,0 +1,59 @@ ++/* ++ * Smart reflex Class 3 specific implementations ++ * ++ * Author: Thara Gopinath <thara@ti.com> ++ * ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Thara Gopinath <thara@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 <plat/smartreflex.h> ++ ++static int sr_class3_enable(struct voltagedomain *voltdm) ++{ ++ unsigned long volt = omap_voltage_get_nom_volt(voltdm); ++ ++ if (!volt) { ++ pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n", ++ __func__, voltdm->name); ++ return -ENODATA; ++ } ++ ++ omap_vp_enable(voltdm); ++ return sr_enable(voltdm, volt); ++} ++ ++static int sr_class3_disable(struct voltagedomain *voltdm, int is_volt_reset) ++{ ++ omap_vp_disable(voltdm); ++ sr_disable(voltdm); ++ if (is_volt_reset) ++ omap_voltage_reset(voltdm); ++ ++ return 0; ++} ++ ++static int sr_class3_configure(struct voltagedomain *voltdm) ++{ ++ return sr_configure_errgen(voltdm); ++} ++ ++/* SR class3 structure */ ++static struct omap_sr_class_data class3_data = { ++ .enable = sr_class3_enable, ++ .disable = sr_class3_disable, ++ .configure = sr_class3_configure, ++ .class_type = SR_CLASS3, ++}; ++ ++/* Smartreflex Class3 init API to be called from board file */ ++static int __init sr_class3_init(void) ++{ ++ pr_info("SmartReflex Class3 initialized\n"); ++ return sr_register_class(&class3_data); ++} ++late_initcall(sr_class3_init); +diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig +index a26f2c3..3d86572 100644 +--- a/arch/arm/plat-omap/Kconfig ++++ b/arch/arm/plat-omap/Kconfig +@@ -57,6 +57,15 @@ config OMAP_SMARTREFLEX + by default during system init via the enable_on_init flag + which an be passed as platform data to the smartreflex driver. + ++config OMAP_SMARTREFLEX_CLASS3 ++ bool "Class 3 mode of Smartreflex Implementation" ++ depends on OMAP_SMARTREFLEX && TWL4030_CORE ++ help ++ Say Y to enable Class 3 implementation of Smartreflex ++ ++ Class 3 implementation of Smartreflex employs continuous hardware ++ voltage calibration. ++ + config OMAP_RESET_CLOCKS + bool "Reset unused clocks during boot" + depends on ARCH_OMAP +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-sr-0007-OMAP3-PM-Register-TWL4030-pmic-info-with-the-voltage.patch ^ |
@@ -0,0 +1,190 @@ +From 7c4398bab9026e916a23e69c82bc05f51def5ff0 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Fri, 10 Dec 2010 22:51:05 +0530 +Subject: [PATCH 07/32] OMAP3: PM: Register TWL4030 pmic info with the voltage driver. + +This patch registers the TWL4030 PMIC specific informtion +with the voltage driver. Failing this patch the voltage driver +is unware of the formula to use for vsel to voltage and vice versa +conversion and lot of other PMIC dependent parameters. + +This file is based on the arch/arm/plat-omap opp_twl_tpl.c file +by Paul Walmsley. The original file is replaced by this file. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/mach-omap2/Makefile | 2 + + arch/arm/mach-omap2/omap_twl.c | 111 ++++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-omap2/pm.c | 4 ++ + arch/arm/mach-omap2/pm.h | 9 +++ + 4 files changed, 126 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/omap_twl.c + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 194ee3b..ac0607c 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -20,6 +20,8 @@ obj-$(CONFIG_ARCH_OMAP4) += $(prcm-common) prm44xx.o $(hwmod-common) + + obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o + ++obj-$(CONFIG_TWL4030_CORE) += omap_twl.o ++ + # SMP support ONLY available for OMAP4 + obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o + obj-$(CONFIG_LOCAL_TIMERS) += timer-mpu.o +diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c +new file mode 100644 +index 0000000..b8f0874 +--- /dev/null ++++ b/arch/arm/mach-omap2/omap_twl.c +@@ -0,0 +1,111 @@ ++/** ++ * OMAP and TWL PMIC specific intializations. ++ * ++ * Copyright (C) 2010 Texas Instruments Incorporated. ++ * Thara Gopinath ++ * Copyright (C) 2009 Texas Instruments Incorporated. ++ * Nishanth Menon ++ * Copyright (C) 2009 Nokia Corporation ++ * Paul Walmsley ++ * ++ * 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/err.h> ++#include <linux/io.h> ++#include <linux/kernel.h> ++ ++#include <plat/voltage.h> ++ ++#define OMAP3_SRI2C_SLAVE_ADDR 0x12 ++#define OMAP3_VDD_MPU_SR_CONTROL_REG 0x00 ++#define OMAP3_VDD_CORE_SR_CONTROL_REG 0x01 ++#define OMAP3_VP_CONFIG_ERROROFFSET 0x00 ++#define OMAP3_VP_VSTEPMIN_VSTEPMIN 0x1 ++#define OMAP3_VP_VSTEPMAX_VSTEPMAX 0x04 ++#define OMAP3_VP_VLIMITTO_TIMEOUT_US 200 ++ ++#define OMAP3430_VP1_VLIMITTO_VDDMIN 0x14 ++#define OMAP3430_VP1_VLIMITTO_VDDMAX 0x42 ++#define OMAP3430_VP2_VLIMITTO_VDDMIN 0x18 ++#define OMAP3430_VP2_VLIMITTO_VDDMAX 0x2c ++ ++#define OMAP3630_VP1_VLIMITTO_VDDMIN 0x18 ++#define OMAP3630_VP1_VLIMITTO_VDDMAX 0x3c ++#define OMAP3630_VP2_VLIMITTO_VDDMIN 0x18 ++#define OMAP3630_VP2_VLIMITTO_VDDMAX 0x30 ++ ++unsigned long twl4030_vsel_to_uv(const u8 vsel) ++{ ++ return (((vsel * 125) + 6000)) * 100; ++} ++ ++u8 twl4030_uv_to_vsel(unsigned long uv) ++{ ++ return DIV_ROUND_UP(uv - 600000, 12500); ++} ++ ++static struct omap_volt_pmic_info omap3_mpu_volt_info = { ++ .slew_rate = 4000, ++ .step_size = 12500, ++ .on_volt = 1200000, ++ .onlp_volt = 1000000, ++ .ret_volt = 975000, ++ .off_volt = 600000, ++ .volt_setup_time = 0xfff, ++ .vp_erroroffset = OMAP3_VP_CONFIG_ERROROFFSET, ++ .vp_vstepmin = OMAP3_VP_VSTEPMIN_VSTEPMIN, ++ .vp_vstepmax = OMAP3_VP_VSTEPMAX_VSTEPMAX, ++ .vp_vddmin = OMAP3430_VP1_VLIMITTO_VDDMIN, ++ .vp_vddmax = OMAP3430_VP1_VLIMITTO_VDDMAX, ++ .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US, ++ .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR, ++ .pmic_reg = OMAP3_VDD_MPU_SR_CONTROL_REG, ++ .vsel_to_uv = twl4030_vsel_to_uv, ++ .uv_to_vsel = twl4030_uv_to_vsel, ++}; ++ ++static struct omap_volt_pmic_info omap3_core_volt_info = { ++ .slew_rate = 4000, ++ .step_size = 12500, ++ .on_volt = 1200000, ++ .onlp_volt = 1000000, ++ .ret_volt = 975000, ++ .off_volt = 600000, ++ .volt_setup_time = 0xfff, ++ .vp_erroroffset = OMAP3_VP_CONFIG_ERROROFFSET, ++ .vp_vstepmin = OMAP3_VP_VSTEPMIN_VSTEPMIN, ++ .vp_vstepmax = OMAP3_VP_VSTEPMAX_VSTEPMAX, ++ .vp_vddmin = OMAP3430_VP2_VLIMITTO_VDDMIN, ++ .vp_vddmax = OMAP3430_VP2_VLIMITTO_VDDMAX, ++ .vp_timeout_us = OMAP3_VP_VLIMITTO_TIMEOUT_US, ++ .i2c_slave_addr = OMAP3_SRI2C_SLAVE_ADDR, ++ .pmic_reg = OMAP3_VDD_CORE_SR_CONTROL_REG, ++ .vsel_to_uv = twl4030_vsel_to_uv, ++ .uv_to_vsel = twl4030_uv_to_vsel, ++}; ++ ++int __init omap3_twl_init(void) ++{ ++ struct voltagedomain *voltdm; ++ ++ if (!cpu_is_omap34xx()) ++ return -ENODEV; ++ ++ if (cpu_is_omap3630()) { ++ omap3_mpu_volt_info.vp_vddmin = OMAP3630_VP1_VLIMITTO_VDDMIN; ++ omap3_mpu_volt_info.vp_vddmax = OMAP3630_VP1_VLIMITTO_VDDMAX; ++ omap3_core_volt_info.vp_vddmin = OMAP3630_VP2_VLIMITTO_VDDMIN; ++ omap3_core_volt_info.vp_vddmax = OMAP3630_VP2_VLIMITTO_VDDMAX; ++ } ++ ++ voltdm = omap_voltage_domain_lookup("mpu"); ++ omap_voltage_register_pmic(voltdm, &omap3_mpu_volt_info); ++ ++ voltdm = omap_voltage_domain_lookup("core"); ++ omap_voltage_register_pmic(voltdm, &omap3_core_volt_info); ++ ++ return 0; ++} +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index 5a6fa1b..f9b9933 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -149,7 +149,11 @@ device_initcall(omap2_common_pm_init); + + static int __init omap2_common_pm_late_init(void) + { ++ /* Init the OMAP TWL parameters */ ++ omap3_twl_init(); ++ /* Init the voltage layer */ + omap_voltage_late_init(); ++ /* Smartreflex device init */ + omap_devinit_smartreflex(); + + return 0; +diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h +index 41dfd68..ef49677 100644 +--- a/arch/arm/mach-omap2/pm.h ++++ b/arch/arm/mach-omap2/pm.h +@@ -99,4 +99,13 @@ static inline int omap_devinit_smartreflex(void) + static inline void omap_enable_smartreflex_on_init(void) {} + #endif + ++#ifdef CONFIG_TWL4030_CORE ++extern int omap3_twl_init(void); ++#else ++static inline int omap3_twl_init(void) ++{ ++ return -EINVAL; ++} ++#endif ++ + #endif +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-sr-0008-OMAP3-PM-Adding-debug-support-to-Voltage-and-Smartre.patch ^ |
@@ -0,0 +1,185 @@ +From 40c18c7d7ec98115ad5e55e7c8a4af9e4f5d38e1 Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Wed, 27 Oct 2010 20:29:37 +0530 +Subject: [PATCH 08/32] OMAP3: PM: Adding debug support to Voltage and Smartreflex drivers + +This patch adds debug support to the voltage and smartreflex drivers. +This means a whole bunch of voltage processor and smartreflex +parameters are now visible through the pm debugfs. +The voltage parameters can be viewed at + /debug/voltage/vdd_<x>/<parameter> +and the smartreflex parameters can be viewed at + /debug/voltage/vdd_<x>/smartreflex/<parameter> + +Also smartreflex n-target values are now exposed out at + /debug/voltage/vdd_<x>/smartreflex/nvalue/<voltage> + +This is a read-write interface which means user has the +flexibility to change the n-target values for any opp. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/mach-omap2/smartreflex.c | 46 ++++++++++++++++++++++++- + arch/arm/mach-omap2/voltage.c | 66 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 110 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index eee23d0..52a05b3 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -31,6 +31,7 @@ + #include "pm.h" + + #define SMARTREFLEX_NAME_LEN 16 ++#define NVALUE_NAME_LEN 40 + #define SR_DISABLE_TIMEOUT 200 + + struct omap_sr { +@@ -817,8 +818,9 @@ static int __init omap_sr_probe(struct platform_device *pdev) + struct omap_sr *sr_info = kzalloc(sizeof(struct omap_sr), GFP_KERNEL); + struct omap_sr_data *pdata = pdev->dev.platform_data; + struct resource *mem, *irq; +- struct dentry *vdd_dbg_dir, *dbg_dir; +- int ret = 0; ++ struct dentry *vdd_dbg_dir, *dbg_dir, *nvalue_dir; ++ struct omap_volt_data *volt_data; ++ int i, ret = 0; + + if (!sr_info) { + dev_err(&pdev->dev, "%s: unable to allocate sr_info\n", +@@ -897,6 +899,46 @@ static int __init omap_sr_probe(struct platform_device *pdev) + + (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir, + (void *)sr_info, &pm_sr_fops); ++ (void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir, ++ &sr_info->err_weight); ++ (void) debugfs_create_x32("errmaxlimit", S_IRUGO, dbg_dir, ++ &sr_info->err_maxlimit); ++ (void) debugfs_create_x32("errminlimit", S_IRUGO, dbg_dir, ++ &sr_info->err_minlimit); ++ ++ nvalue_dir = debugfs_create_dir("nvalue", dbg_dir); ++ if (IS_ERR(nvalue_dir)) { ++ dev_err(&pdev->dev, "%s: Unable to create debugfs directory" ++ "for n-values\n", __func__); ++ return PTR_ERR(nvalue_dir); ++ } ++ ++ omap_voltage_get_volttable(sr_info->voltdm, &volt_data); ++ if (!volt_data) { ++ dev_warn(&pdev->dev, "%s: No Voltage table for the" ++ " corresponding vdd vdd_%s. Cannot create debugfs" ++ "entries for n-values\n", ++ __func__, sr_info->voltdm->name); ++ return -ENODATA; ++ } ++ ++ for (i = 0; i < sr_info->nvalue_count; i++) { ++ char *name; ++ char volt_name[32]; ++ ++ name = kzalloc(NVALUE_NAME_LEN + 1, GFP_KERNEL); ++ if (!name) { ++ dev_err(&pdev->dev, "%s: Unable to allocate memory" ++ " for n-value directory name\n", __func__); ++ return -ENOMEM; ++ } ++ ++ strcpy(name, "volt_"); ++ sprintf(volt_name, "%d", volt_data[i].volt_nominal); ++ strcat(name, volt_name); ++ (void) debugfs_create_x32(name, S_IRUGO | S_IWUGO, nvalue_dir, ++ &(sr_info->nvalue_table[i].nvalue)); ++ } + + return ret; + +diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c +index 8dac2df..8324573 100644 +--- a/arch/arm/mach-omap2/voltage.c ++++ b/arch/arm/mach-omap2/voltage.c +@@ -250,6 +250,47 @@ static void omap3_voltage_write_reg(u32 val, u16 mod, u8 offset) + prm_write_mod_reg(val, mod, offset); + } + ++/* Voltage debugfs support */ ++static int vp_volt_debug_get(void *data, u64 *val) ++{ ++ struct omap_vdd_info *vdd = (struct omap_vdd_info *) data; ++ u8 vsel; ++ ++ if (!vdd) { ++ pr_warning("Wrong paramater passed\n"); ++ return -EINVAL; ++ } ++ ++ vsel = vdd->read_reg(vdd->vp_reg.prm_mod, vdd->vp_offs.voltage); ++ pr_notice("curr_vsel = %x\n", vsel); ++ ++ if (!vdd->pmic_info->vsel_to_uv) { ++ pr_warning("PMIC function to convert vsel to voltage" ++ "in uV not registerd\n"); ++ return -EINVAL; ++ } ++ ++ *val = vdd->pmic_info->vsel_to_uv(vsel); ++ return 0; ++} ++ ++static int nom_volt_debug_get(void *data, u64 *val) ++{ ++ struct omap_vdd_info *vdd = (struct omap_vdd_info *) data; ++ ++ if (!vdd) { ++ pr_warning("Wrong paramater passed\n"); ++ return -EINVAL; ++ } ++ ++ *val = omap_voltage_get_nom_volt(&vdd->voltdm); ++ ++ return 0; ++} ++ ++DEFINE_SIMPLE_ATTRIBUTE(vp_volt_debug_fops, vp_volt_debug_get, NULL, "%llu\n"); ++DEFINE_SIMPLE_ATTRIBUTE(nom_volt_debug_fops, nom_volt_debug_get, NULL, ++ "%llu\n"); + static void vp_latch_vsel(struct omap_vdd_info *vdd) + { + u32 vpconfig; +@@ -349,7 +390,32 @@ static void __init vdd_debugfs_init(struct omap_vdd_info *vdd) + pr_warning("%s: Unable to create debugfs directory for" + " vdd_%s\n", __func__, vdd->voltdm.name); + vdd->debug_dir = NULL; ++ return; + } ++ ++ (void) debugfs_create_x16("vp_errorgain", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vpconfig_errorgain)); ++ (void) debugfs_create_x16("vp_smpswaittimemin", S_IRUGO, ++ vdd->debug_dir, ++ &(vdd->vp_reg.vstepmin_smpswaittimemin)); ++ (void) debugfs_create_x8("vp_stepmin", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vstepmin_stepmin)); ++ (void) debugfs_create_x16("vp_smpswaittimemax", S_IRUGO, ++ vdd->debug_dir, ++ &(vdd->vp_reg.vstepmax_smpswaittimemax)); ++ (void) debugfs_create_x8("vp_stepmax", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vstepmax_stepmax)); ++ (void) debugfs_create_x8("vp_vddmax", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vlimitto_vddmax)); ++ (void) debugfs_create_x8("vp_vddmin", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vlimitto_vddmin)); ++ (void) debugfs_create_x16("vp_timeout", S_IRUGO, vdd->debug_dir, ++ &(vdd->vp_reg.vlimitto_timeout)); ++ (void) debugfs_create_file("curr_vp_volt", S_IRUGO, vdd->debug_dir, ++ (void *) vdd, &vp_volt_debug_fops); ++ (void) debugfs_create_file("curr_nominal_volt", S_IRUGO, ++ vdd->debug_dir, (void *) vdd, ++ &nom_volt_debug_fops); + } + + /* Voltage scale and accessory APIs */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-sr-0009-OMAP3-PM-Program-correct-init-voltages-for-VDD1-and-.patch ^ |
@@ -0,0 +1,124 @@ +From 20dc0bef7655834e3512fff0238b59c08b88f1bf Mon Sep 17 00:00:00 2001 +From: Thara Gopinath <thara@ti.com> +Date: Sat, 29 May 2010 22:02:25 +0530 +Subject: [PATCH 09/32] OMAP3: PM: Program correct init voltages for VDD1 and VDD2 + +By default the system boots up at nominal voltage for every +voltage domain in the system. This patch puts VDD1 and VDD2 +to the correct boot up voltage as per the opp tables specified. +This patch implements this by matching the rate of the main clock +of the voltage domain with the opp table and picking up the correct +voltage. + +Signed-off-by: Thara Gopinath <thara@ti.com> +Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> +--- + arch/arm/mach-omap2/pm.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 76 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index f9b9933..3f2cadd 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -13,6 +13,7 @@ + #include <linux/init.h> + #include <linux/io.h> + #include <linux/err.h> ++#include <linux/opp.h> + + #include <plat/omap-pm.h> + #include <plat/omap_device.h> +@@ -138,6 +139,76 @@ err: + return ret; + } + ++/* ++ * This API is to be called during init to put the various voltage ++ * domains to the voltage as per the opp table. Typically we boot up ++ * at the nominal voltage. So this function finds out the rate of ++ * the clock associated with the voltage domain, finds out the correct ++ * opp entry and puts the voltage domain to the voltage specifies ++ * in the opp entry ++ */ ++static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, ++ struct device *dev) ++{ ++ struct voltagedomain *voltdm; ++ struct clk *clk; ++ struct opp *opp; ++ unsigned long freq, bootup_volt; ++ ++ if (!vdd_name || !clk_name || !dev) { ++ printk(KERN_ERR "%s: Invalid parameters!\n", __func__); ++ goto exit; ++ } ++ ++ voltdm = omap_voltage_domain_lookup(vdd_name); ++ if (IS_ERR(voltdm)) { ++ printk(KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n", ++ __func__, vdd_name); ++ goto exit; ++ } ++ ++ clk = clk_get(NULL, clk_name); ++ if (IS_ERR(clk)) { ++ printk(KERN_ERR "%s: unable to get clk %s\n", ++ __func__, clk_name); ++ goto exit; ++ } ++ ++ freq = clk->rate; ++ clk_put(clk); ++ ++ opp = opp_find_freq_ceil(dev, &freq); ++ if (IS_ERR(opp)) { ++ printk(KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n", ++ __func__, vdd_name); ++ goto exit; ++ } ++ ++ bootup_volt = opp_get_voltage(opp); ++ if (!bootup_volt) { ++ printk(KERN_ERR "%s: unable to find voltage corresponding" ++ "to the bootup OPP for vdd_%s\n", __func__, vdd_name); ++ goto exit; ++ } ++ ++ omap_voltage_scale_vdd(voltdm, bootup_volt); ++ return 0; ++ ++exit: ++ printk(KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n", ++ __func__, vdd_name); ++ return -EINVAL; ++} ++ ++static void __init omap3_init_voltages(void) ++{ ++ if (!cpu_is_omap34xx()) ++ return; ++ ++ omap2_set_init_voltage("mpu", "dpll1_ck", mpu_dev); ++ omap2_set_init_voltage("core", "l3_ick", l3_dev); ++} ++ + static int __init omap2_common_pm_init(void) + { + omap2_init_processor_devices(); +@@ -151,8 +222,13 @@ static int __init omap2_common_pm_late_init(void) + { + /* Init the OMAP TWL parameters */ + omap3_twl_init(); ++ + /* Init the voltage layer */ + omap_voltage_late_init(); ++ ++ /* Initialize the voltages */ ++ omap3_init_voltages(); ++ + /* Smartreflex device init */ + omap_devinit_smartreflex(); + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-staging-zram-Fix-sparse-warning-Using-plain-integer-.patch ^ |
@@ -0,0 +1,48 @@ +From 7ae6e17a680141541e2b99924827ef214c2e8de9 Mon Sep 17 00:00:00 2001 +From: Peter Huewe <peterhuewe@gmx.de> +Date: Tue, 7 Dec 2010 23:44:33 +0100 +Subject: [PATCH] staging/zram: Fix sparse warning 'Using plain integer as NULL pointer' + +This patch fixes the warning generated by sparse: "Using plain integer +as NULL pointer" by replacing the offending 0s with NULL. + +Signed-off-by: Peter Huewe <peterhuewe@gmx.de> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/xvmalloc.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c +index 3fdbb8a..b644067 100644 +--- a/drivers/staging/zram/xvmalloc.c ++++ b/drivers/staging/zram/xvmalloc.c +@@ -187,7 +187,7 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset, + slindex = get_index_for_insert(block->size); + flindex = slindex / BITS_PER_LONG; + +- block->link.prev_page = 0; ++ block->link.prev_page = NULL; + block->link.prev_offset = 0; + block->link.next_page = pool->freelist[slindex].page; + block->link.next_offset = pool->freelist[slindex].offset; +@@ -217,7 +217,7 @@ static void remove_block_head(struct xv_pool *pool, + + pool->freelist[slindex].page = block->link.next_page; + pool->freelist[slindex].offset = block->link.next_offset; +- block->link.prev_page = 0; ++ block->link.prev_page = NULL; + block->link.prev_offset = 0; + + if (!pool->freelist[slindex].page) { +@@ -232,7 +232,7 @@ static void remove_block_head(struct xv_pool *pool, + */ + tmpblock = get_ptr_atomic(pool->freelist[slindex].page, + pool->freelist[slindex].offset, KM_USER1); +- tmpblock->link.prev_page = 0; ++ tmpblock->link.prev_page = NULL; + tmpblock->link.prev_offset = 0; + put_ptr_atomic(tmpblock, KM_USER1); + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-staging-zram-fix-data-corruption-issue.patch ^ |
@@ -0,0 +1,54 @@ +From c117f893bf8dda195c0777faadc35e9a4ec4e27f Mon Sep 17 00:00:00 2001 +From: Nitin Gupta <ngupta@vflare.org> +Date: Sat, 5 Feb 2011 20:34:20 -0500 +Subject: [PATCH] staging: zram: fix data corruption issue + +In zram_read() and zram_write() we were not incrementing the +index number and thus were reading/writing values from/to +incorrect sectors on zram disk, resulting in data corruption. + +Signed-off-by: Nitin Gupta <ngupta@vflare.org> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_drv.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c +index d0e9e02..080e85f 100644 +--- a/drivers/staging/zram/zram_drv.c ++++ b/drivers/staging/zram/zram_drv.c +@@ -227,6 +227,7 @@ static int zram_read(struct zram *zram, struct bio *bio) + + if (zram_test_flag(zram, index, ZRAM_ZERO)) { + handle_zero_page(page); ++ index++; + continue; + } + +@@ -235,12 +236,14 @@ static int zram_read(struct zram *zram, struct bio *bio) + pr_debug("Read before write: sector=%lu, size=%u", + (ulong)(bio->bi_sector), bio->bi_size); + /* Do nothing */ ++ index++; + continue; + } + + /* Page is stored uncompressed since it's incompressible */ + if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) { + handle_uncompressed_page(zram, page, index); ++ index++; + continue; + } + +@@ -320,6 +323,7 @@ static int zram_write(struct zram *zram, struct bio *bio) + mutex_unlock(&zram->lock); + zram_stat_inc(&zram->stats.pages_zero); + zram_set_flag(zram, index, ZRAM_ZERO); ++ index++; + continue; + } + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.38-tty-add-active-sysfs-attribute-to-tty0-and-console-d.patch ^ |
@@ -0,0 +1,219 @@ +From 71c3f254e2a83b675537d07d1b469fd6067b7fca Mon Sep 17 00:00:00 2001 +From: Kay Sievers <kay.sievers@vrfy.org> +Date: Wed, 1 Dec 2010 17:51:05 +0100 +Subject: [PATCH] tty: add 'active' sysfs attribute to tty0 and console device + +tty: add 'active' sysfs attribute to tty0 and console device + +tty: add 'active' sysfs attribute to tty0 and console device + +Userspace can query the actual virtual console, and the configured +console devices behind /dev/tt0 and /dev/console. + +The last entry in the list of devices is the active device, analog +to the console= kernel command line option. + +The attribute supports poll(), which is raised when the virtual +console is changed or /dev/console is reconfigured. + +Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +index 0000000..b138b66 +--- + Documentation/ABI/testing/sysfs-tty | 19 ++++++++++++++ + drivers/tty/tty_io.c | 47 ++++++++++++++++++++++++++++++++--- + drivers/tty/vt/vt.c | 23 ++++++++++++++++- + include/linux/console.h | 2 +- + kernel/printk.c | 2 + + 5 files changed, 87 insertions(+), 6 deletions(-) + create mode 100644 Documentation/ABI/testing/sysfs-tty + +diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty +new file mode 100644 +index 0000000..b138b66 +--- /dev/null ++++ b/Documentation/ABI/testing/sysfs-tty +@@ -0,0 +1,19 @@ ++What: /sys/class/tty/console/active ++Date: Nov 2010 ++Contact: Kay Sievers <kay.sievers@vrfy.org> ++Description: ++ Shows the list of currently configured ++ console devices, like 'tty1 ttyS0'. ++ The last entry in the file is the active ++ device connected to /dev/console. ++ The file supports poll() to detect virtual ++ console switches. ++ ++What: /sys/class/tty/tty0/active ++Date: Nov 2010 ++Contact: Kay Sievers <kay.sievers@vrfy.org> ++Description: ++ Shows the currently active virtual console ++ device, like 'tty1'. ++ The file supports poll() to detect virtual ++ console switches. +diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c +index 35480dd..cb9cb95 100644 +--- a/drivers/tty/tty_io.c ++++ b/drivers/tty/tty_io.c +@@ -3241,9 +3241,45 @@ static int __init tty_class_init(void) + postcore_initcall(tty_class_init); + + /* 3/2004 jmc: why do these devices exist? */ +- + static struct cdev tty_cdev, console_cdev; + ++static ssize_t show_cons_active(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ struct console *cs[16]; ++ int i = 0; ++ struct console *c; ++ ssize_t count = 0; ++ ++ acquire_console_sem(); ++ for (c = console_drivers; c; c = c->next) { ++ if (!c->device) ++ continue; ++ if (!c->write) ++ continue; ++ if ((c->flags & CON_ENABLED) == 0) ++ continue; ++ cs[i++] = c; ++ if (i >= ARRAY_SIZE(cs)) ++ break; ++ } ++ while (i--) ++ count += sprintf(buf + count, "%s%d%c", ++ cs[i]->name, cs[i]->index, i ? ' ':'\n'); ++ release_console_sem(); ++ ++ return count; ++} ++static DEVICE_ATTR(active, S_IRUGO, show_cons_active, NULL); ++ ++static struct device *consdev; ++ ++void console_sysfs_notify(void) ++{ ++ if (consdev) ++ sysfs_notify(&consdev->kobj, NULL, "active"); ++} ++ + /* + * Ok, now we can initialize the rest of the tty devices and can count + * on memory allocations, interrupts etc.. +@@ -3254,15 +3290,18 @@ int __init tty_init(void) + if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) + panic("Couldn't register /dev/tty driver\n"); +- device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, +- "tty"); ++ device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); + + cdev_init(&console_cdev, &console_fops); + if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) + panic("Couldn't register /dev/console driver\n"); +- device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, ++ consdev = device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, + "console"); ++ if (IS_ERR(consdev)) ++ consdev = NULL; ++ else ++ device_create_file(consdev, &dev_attr_active); + + #ifdef CONFIG_VT + vty_init(&console_fops); +diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c +index a8ec48e..76407ec 100644 +--- a/drivers/tty/vt/vt.c ++++ b/drivers/tty/vt/vt.c +@@ -236,6 +236,14 @@ enum { + }; + + /* ++ * /sys/class/tty/tty0/ ++ * ++ * the attribute 'active' contains the name of the current vc ++ * console and it supports poll() to detect vc switches ++ */ ++static struct device *tty0dev; ++ ++/* + * Notifier list for console events. + */ + static ATOMIC_NOTIFIER_HEAD(vt_notifier_list); +@@ -688,6 +696,8 @@ void redraw_screen(struct vc_data *vc, int is_switch) + save_screen(old_vc); + set_origin(old_vc); + } ++ if (tty0dev) ++ sysfs_notify(&tty0dev->kobj, NULL, "active"); + } else { + hide_cursor(vc); + redraw = 1; +@@ -2967,13 +2977,24 @@ static const struct tty_operations con_ops = { + + static struct cdev vc0_cdev; + ++static ssize_t show_tty_active(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "tty%d\n", fg_console + 1); ++} ++static DEVICE_ATTR(active, S_IRUGO, show_tty_active, NULL); ++ + int __init vty_init(const struct file_operations *console_fops) + { + cdev_init(&vc0_cdev, console_fops); + if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) + panic("Couldn't register /dev/tty0 driver\n"); +- device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); ++ tty0dev = device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); ++ if (IS_ERR(tty0dev)) ++ tty0dev = NULL; ++ else ++ device_create_file(tty0dev, &dev_attr_active); + + vcs_init(); + +diff --git a/include/linux/console.h b/include/linux/console.h +index 95cf6f0..0752d92 100644 +--- a/include/linux/console.h ++++ b/include/linux/console.h +@@ -145,7 +145,7 @@ extern int is_console_locked(void); + extern int braille_register_console(struct console *, int index, + char *console_options, char *braille_options); + extern int braille_unregister_console(struct console *); +- ++extern void console_sysfs_notify(void); + extern int console_suspend_enabled; + + /* Suspend and resume console messages over PM events */ +diff --git a/kernel/printk.c b/kernel/printk.c +index a23315d..fb6239b 100644 +--- a/kernel/printk.c | ||
[-] [+] | Added | linux-2.6.38-wl1251-fix-4-byte-TX-buffer-alignment.patch ^ |
@@ -0,0 +1,61 @@ +From bdbd39acfeed93e2ac13e939b9bc69e6f68e3f88 Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 20:10:48 +0100 +Subject: [PATCH 1/3] wl1251: fix 4-byte TX buffer alignment + +This implements TX buffer alignment for cloned or too small skb by +copying and replacing the original skb. +Recent changes in wireless-testing seems to make this really necessary. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +Signed-off-by: Mika Laitio <lamikr@pilppa.org> +--- + drivers/net/wireless/wl1251/tx.c | 26 ++++++++++++++++++++------ + 1 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/tx.c b/drivers/net/wireless/wl1251/tx.c +index 10112de..28121c5 100644 +--- a/drivers/net/wireless/wl1251/tx.c ++++ b/drivers/net/wireless/wl1251/tx.c +@@ -213,16 +213,30 @@ static int wl1251_tx_send_packet(struct wl1251 *wl, struct sk_buff *skb, + wl1251_debug(DEBUG_TX, "skb offset %d", offset); + + /* check whether the current skb can be used */ +- if (!skb_cloned(skb) && (skb_tailroom(skb) >= offset)) { +- unsigned char *src = skb->data; ++ if (skb_cloned(skb) || (skb_tailroom(skb) < offset)) { ++ struct sk_buff *newskb = skb_copy_expand(skb, 0, 3, ++ GFP_KERNEL); ++ ++ if (unlikely(newskb == NULL)) { ++ wl1251_error("Can't allocate skb!"); ++ return -EINVAL; ++ } ++ ++ tx_hdr = (struct tx_double_buffer_desc *) newskb->data; ++ ++ dev_kfree_skb_any(skb); ++ wl->tx_frames[tx_hdr->id] = skb = newskb; + +- /* align the buffer on a 4-byte boundary */ ++ offset = (4 - (long)skb->data) & 0x03; ++ wl1251_debug(DEBUG_TX, "new skb offset %d", offset); ++ } ++ ++ /* align the buffer on a 4-byte boundary */ ++ if (offset) { ++ unsigned char *src = skb->data; + skb_reserve(skb, offset); + memmove(skb->data, src, skb->len); + tx_hdr = (struct tx_double_buffer_desc *) skb->data; +- } else { +- wl1251_info("No handler, fixme!"); +- return -EINVAL; + } + } + +-- +1.7.1 + | ||
[-] [+] | Added | linux-2.6.38-wl1251-fix-queue-stopping-waking-for-TX-path.patch ^ |
@@ -0,0 +1,122 @@ +From e7332a41442bde1c14550998cadceca34c967dfc Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 20:10:46 +0100 +Subject: [PATCH] wl1251: fix queue stopping/waking for TX path + +The queue stopping/waking functionality was broken in a way that could +cause the TX to stall if the right circumstances are met. + +The problem was caused by tx_work, which is scheduled on each TX operation. +If the firmware buffer is full, tx_work does nothing. In combinition with +stopped queues or non-continues transfers, tx_work is never scheduled again. +Moreover the low watermark introduced by +9df86e2e702c6d5547aced7f241addd2d698bb11 never takes effect because of some +old code. + +Solve this by scheduling tx_work every time tx_queue is non-empty and +firmware buffer is freed on tx_complete. + +This also solves a possible but unlikely case: If less frames than the high +watermark are queued, but more than firmware buffer can hold. This results +in queues staying awake but the only scheduled tx_work doesn't transfer all +frames, so the remaining frames are stuck in the queue until more frames +get queued and tx_work is scheduled again. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +Notes: +Tested-by: Mika Laitio <ext-mika.1.laitio@nokia.com> +Seems to fix the file transfer hang bug on N900/Meego/2.6.37 images: +https://bugs.meego.com/show_bug.cgi?id=13581 +--- + drivers/net/wireless/wl1251/tx.c | 48 +++++++++---------------------------- + 1 files changed, 12 insertions(+), 36 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/tx.c b/drivers/net/wireless/wl1251/tx.c +index 554b4f9..10112de 100644 +--- a/drivers/net/wireless/wl1251/tx.c ++++ b/drivers/net/wireless/wl1251/tx.c +@@ -368,7 +368,7 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl, + { + struct ieee80211_tx_info *info; + struct sk_buff *skb; +- int hdrlen, ret; ++ int hdrlen; + u8 *frame; + + skb = wl->tx_frames[result->id]; +@@ -407,40 +407,12 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl, + ieee80211_tx_status(wl->hw, skb); + + wl->tx_frames[result->id] = NULL; +- +- if (wl->tx_queue_stopped) { +- wl1251_debug(DEBUG_TX, "cb: queue was stopped"); +- +- skb = skb_dequeue(&wl->tx_queue); +- +- /* The skb can be NULL because tx_work might have been +- scheduled before the queue was stopped making the +- queue empty */ +- +- if (skb) { +- ret = wl1251_tx_frame(wl, skb); +- if (ret == -EBUSY) { +- /* firmware buffer is still full */ +- wl1251_debug(DEBUG_TX, "cb: fw buffer " +- "still full"); +- skb_queue_head(&wl->tx_queue, skb); +- return; +- } else if (ret < 0) { +- dev_kfree_skb(skb); +- return; +- } +- } +- +- wl1251_debug(DEBUG_TX, "cb: waking queues"); +- ieee80211_wake_queues(wl->hw); +- wl->tx_queue_stopped = false; +- } + } + + /* Called upon reception of a TX complete interrupt */ + void wl1251_tx_complete(struct wl1251 *wl) + { +- int i, result_index, num_complete = 0; ++ int i, result_index, num_complete = 0, queue_len; + struct tx_result result[FW_TX_CMPLT_BLOCK_SIZE], *result_ptr; + unsigned long flags; + +@@ -471,18 +443,22 @@ void wl1251_tx_complete(struct wl1251 *wl) + } + } + +- if (wl->tx_queue_stopped +- && +- skb_queue_len(&wl->tx_queue) <= WL1251_TX_QUEUE_LOW_WATERMARK){ ++ queue_len = skb_queue_len(&wl->tx_queue); + +- /* firmware buffer has space, restart queues */ ++ if ((num_complete > 0) && (queue_len > 0)) { ++ /* firmware buffer has space, reschedule tx_work */ ++ wl1251_debug(DEBUG_TX, "tx_complete: reschedule tx_work"); ++ ieee80211_queue_work(wl->hw, &wl->tx_work); ++ } ++ ++ if (wl->tx_queue_stopped && ++ queue_len <= WL1251_TX_QUEUE_LOW_WATERMARK) { ++ /* tx_queue has space, restart queues */ + wl1251_debug(DEBUG_TX, "tx_complete: waking queues"); + spin_lock_irqsave(&wl->wl_lock, flags); + ieee80211_wake_queues(wl->hw); + wl->tx_queue_stopped = false; + spin_unlock_irqrestore(&wl->wl_lock, flags); +- ieee80211_queue_work(wl->hw, &wl->tx_work); +- + } + + /* Every completed frame needs to be acknowledged */ +-- +1.7.1 + | ||
[-] [+] | Added | linux-2.6.39-0001-wl1251-enable-beacon-early-termination-while-in-powe.patch ^ |
@@ -0,0 +1,149 @@ +From 467ecdc9c4668f8fab9b490d105e9e430dc2d428 Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 20:10:57 +0100 +Subject: [PATCH 1/6] wl1251: enable beacon early termination while in power-saving mode + +Port the beacon early termination feature from wl1251 driver version +included in the Maemo Fremantle kernel. +It is enabled when going to power-saving mode and disabled when leaving +power-saving mode. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/acx.c | 28 ++++++++++++++++++++++++++++ + drivers/net/wireless/wl1251/acx.h | 27 +++++++++++++++++++++++++++ + drivers/net/wireless/wl1251/ps.c | 11 +++++++++++ + drivers/net/wireless/wl1251/wl1251.h | 2 ++ + 4 files changed, 68 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/acx.c b/drivers/net/wireless/wl1251/acx.c +index 64a0214..8c94366 100644 +--- a/drivers/net/wireless/wl1251/acx.c ++++ b/drivers/net/wireless/wl1251/acx.c +@@ -978,6 +978,34 @@ out: + return ret; + } + ++int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode, ++ u8 max_consecutive) ++{ ++ struct wl1251_acx_bet_enable *acx; ++ int ret; ++ ++ wl1251_debug(DEBUG_ACX, "acx bet enable"); ++ ++ acx = kzalloc(sizeof(*acx), GFP_KERNEL); ++ if (!acx) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ acx->enable = mode; ++ acx->max_consecutive = max_consecutive; ++ ++ ret = wl1251_cmd_configure(wl, ACX_BET_ENABLE, acx, sizeof(*acx)); ++ if (ret < 0) { ++ wl1251_warning("wl1251 acx bet enable failed: %d", ret); ++ goto out; ++ } ++ ++out: ++ kfree(acx); ++ return ret; ++} ++ + int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max, + u8 aifs, u16 txop) + { +diff --git a/drivers/net/wireless/wl1251/acx.h b/drivers/net/wireless/wl1251/acx.h +index e54b21a..7c6ffec 100644 +--- a/drivers/net/wireless/wl1251/acx.h ++++ b/drivers/net/wireless/wl1251/acx.h +@@ -1164,6 +1164,31 @@ struct wl1251_acx_wr_tbtt_and_dtim { + u8 padding; + } __packed; + ++enum wl1251_acx_bet_mode { ++ WL1251_ACX_BET_DISABLE = 0, ++ WL1251_ACX_BET_ENABLE = 1, ++}; ++ ++struct wl1251_acx_bet_enable { ++ struct acx_header header; ++ ++ /* ++ * Specifies if beacon early termination procedure is enabled or ++ * disabled, see enum wl1251_acx_bet_mode. ++ */ ++ u8 enable; ++ ++ /* ++ * Specifies the maximum number of consecutive beacons that may be ++ * early terminated. After this number is reached at least one full ++ * beacon must be correctly received in FW before beacon ET ++ * resumes. Range 0 - 255. ++ */ ++ u8 max_consecutive; ++ ++ u8 padding[2]; ++} __packed; ++ + struct wl1251_acx_ac_cfg { + struct acx_header header; + +@@ -1401,6 +1426,8 @@ int wl1251_acx_tsf_info(struct wl1251 *wl, u64 *mactime); + int wl1251_acx_rate_policies(struct wl1251 *wl); + int wl1251_acx_mem_cfg(struct wl1251 *wl); + int wl1251_acx_wr_tbtt_and_dtim(struct wl1251 *wl, u16 tbtt, u8 dtim); ++int wl1251_acx_bet_enable(struct wl1251 *wl, enum wl1251_acx_bet_mode mode, ++ u8 max_consecutive); + int wl1251_acx_ac_cfg(struct wl1251 *wl, u8 ac, u8 cw_min, u16 cw_max, + u8 aifs, u16 txop); + int wl1251_acx_tid_cfg(struct wl1251 *wl, u8 queue, +diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c +index 5ed47c8..9ba23ed 100644 +--- a/drivers/net/wireless/wl1251/ps.c ++++ b/drivers/net/wireless/wl1251/ps.c +@@ -153,6 +153,11 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + if (ret < 0) + return ret; + ++ ret = wl1251_acx_bet_enable(wl, WL1251_ACX_BET_ENABLE, ++ WL1251_DEFAULT_BET_CONSECUTIVE); ++ if (ret < 0) ++ return ret; ++ + ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE); + if (ret < 0) + return ret; +@@ -170,6 +175,12 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + if (ret < 0) + return ret; + ++ /* disable BET */ ++ ret = wl1251_acx_bet_enable(wl, WL1251_ACX_BET_DISABLE, ++ WL1251_DEFAULT_BET_CONSECUTIVE); ++ if (ret < 0) ++ return ret; ++ + /* disable beacon filtering */ + ret = wl1251_acx_beacon_filter_opt(wl, false); + if (ret < 0) +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h +index e113d4c..acc4c75 100644 +--- a/drivers/net/wireless/wl1251/wl1251.h ++++ b/drivers/net/wireless/wl1251/wl1251.h +@@ -409,6 +409,8 @@ void wl1251_disable_interrupts(struct wl1251 *wl); + + #define WL1251_DEFAULT_CHANNEL 0 + ++#define WL1251_DEFAULT_BET_CONSECUTIVE 10 ++ + #define CHIP_ID_1251_PG10 (0x7010101) + #define CHIP_ID_1251_PG11 (0x7020101) + #define CHIP_ID_1251_PG12 (0x7030101) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-0002-wl1251-implement-connection-quality-monitoring.patch ^ |
@@ -0,0 +1,222 @@ +From 3fa981fcf3a045389700e3de7fbc304909b76352 Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 20:11:00 +0100 +Subject: [PATCH 2/6] wl1251: implement connection quality monitoring + +Implement connection quality monitoring similar to the wl1271 driver. +It triggers ieee80211_cqm_rssi_notify with the corresponding event when +RSSI drops blow RSSI threshold or rises again above the RSSI threshold. +It should be noted that wl1251 doesn't support RSSI hysteresis, instead it +uses RSSI averageing and delays events until a certain count of frames +proved RSSI change. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/acx.c | 25 +++++++++++++++++++ + drivers/net/wireless/wl1251/acx.h | 45 ++++++++++++++++++++++++++++++++++ + drivers/net/wireless/wl1251/event.c | 18 +++++++++++++ + drivers/net/wireless/wl1251/main.c | 15 ++++++++++- + drivers/net/wireless/wl1251/wl1251.h | 5 ++++ + 5 files changed, 107 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/acx.c b/drivers/net/wireless/wl1251/acx.c +index 8c94366..ef8370e 100644 +--- a/drivers/net/wireless/wl1251/acx.c ++++ b/drivers/net/wireless/wl1251/acx.c +@@ -776,6 +776,31 @@ out: + return ret; + } + ++int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight, ++ u8 depth, enum wl1251_acx_low_rssi_type type) ++{ ++ struct acx_low_rssi *rssi; ++ int ret; ++ ++ wl1251_debug(DEBUG_ACX, "acx low rssi"); ++ ++ rssi = kzalloc(sizeof(*rssi), GFP_KERNEL); ++ if (!rssi) ++ return -ENOMEM; ++ ++ rssi->threshold = threshold; ++ rssi->weight = weight; ++ rssi->depth = depth; ++ rssi->type = type; ++ ++ ret = wl1251_cmd_configure(wl, ACX_LOW_RSSI, rssi, sizeof(*rssi)); ++ if (ret < 0) ++ wl1251_warning("failed to set low rssi threshold: %d", ret); ++ ++ kfree(rssi); ++ return ret; ++} ++ + int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble) + { + struct acx_preamble *acx; +diff --git a/drivers/net/wireless/wl1251/acx.h b/drivers/net/wireless/wl1251/acx.h +index 7c6ffec..51b62d6 100644 +--- a/drivers/net/wireless/wl1251/acx.h ++++ b/drivers/net/wireless/wl1251/acx.h +@@ -399,6 +399,49 @@ struct acx_rts_threshold { + u8 pad[2]; + } __packed; + ++enum wl1251_acx_low_rssi_type { ++ /* ++ * The event is a "Level" indication which keeps triggering ++ * as long as the average RSSI is below the threshold. ++ */ ++ WL1251_ACX_LOW_RSSI_TYPE_LEVEL = 0, ++ ++ /* ++ * The event is an "Edge" indication which triggers ++ * only when the RSSI threshold is crossed from above. ++ */ ++ WL1251_ACX_LOW_RSSI_TYPE_EDGE = 1, ++}; ++ ++struct acx_low_rssi { ++ struct acx_header header; ++ ++ /* ++ * The threshold (in dBm) below (or above after low rssi ++ * indication) which the firmware generates an interrupt to the ++ * host. This parameter is signed. ++ */ ++ s8 threshold; ++ ++ /* ++ * The weight of the current RSSI sample, before adding the new ++ * sample, that is used to calculate the average RSSI. ++ */ ++ u8 weight; ++ ++ /* ++ * The number of Beacons/Probe response frames that will be ++ * received before issuing the Low or Regained RSSI event. ++ */ ++ u8 depth; ++ ++ /* ++ * Configures how the Low RSSI Event is triggered. Refer to ++ * enum wl1251_acx_low_rssi_type for more. ++ */ ++ u8 type; ++} __packed; ++ + struct acx_beacon_filter_option { + struct acx_header header; + +@@ -1418,6 +1461,8 @@ int wl1251_acx_cca_threshold(struct wl1251 *wl); + int wl1251_acx_bcn_dtim_options(struct wl1251 *wl); + int wl1251_acx_aid(struct wl1251 *wl, u16 aid); + int wl1251_acx_event_mbox_mask(struct wl1251 *wl, u32 event_mask); ++int wl1251_acx_low_rssi(struct wl1251 *wl, s8 threshold, u8 weight, ++ u8 depth, enum wl1251_acx_low_rssi_type type); + int wl1251_acx_set_preamble(struct wl1251 *wl, enum acx_preamble_type preamble); + int wl1251_acx_cts_protect(struct wl1251 *wl, + enum acx_ctsprotect_type ctsprotect); +diff --git a/drivers/net/wireless/wl1251/event.c b/drivers/net/wireless/wl1251/event.c +index 712372e..dfc4579 100644 +--- a/drivers/net/wireless/wl1251/event.c ++++ b/drivers/net/wireless/wl1251/event.c +@@ -90,6 +90,24 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) + } + } + ++ if (wl->vif && wl->rssi_thold) { ++ if (vector & ROAMING_TRIGGER_LOW_RSSI_EVENT_ID) { ++ wl1251_debug(DEBUG_EVENT, ++ "ROAMING_TRIGGER_LOW_RSSI_EVENT"); ++ ieee80211_cqm_rssi_notify(wl->vif, ++ NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, ++ GFP_KERNEL); ++ } ++ ++ if (vector & ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID) { ++ wl1251_debug(DEBUG_EVENT, ++ "ROAMING_TRIGGER_REGAINED_RSSI_EVENT"); ++ ieee80211_cqm_rssi_notify(wl->vif, ++ NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, ++ GFP_KERNEL); ++ } ++ } ++ + return 0; + } + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index e270d97..e47c124 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -580,6 +580,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) + wl->psm = 0; + wl->tx_queue_stopped = false; + wl->power_level = WL1251_DEFAULT_POWER_LEVEL; ++ wl->rssi_thold = 0; + wl->channel = WL1251_DEFAULT_CHANNEL; + + wl1251_debugfs_reset(wl); +@@ -1037,6 +1038,16 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, + if (ret < 0) + goto out; + ++ if (changed & BSS_CHANGED_CQM) { ++ ret = wl1251_acx_low_rssi(wl, bss_conf->cqm_rssi_thold, ++ WL1251_DEFAULT_LOW_RSSI_WEIGHT, ++ WL1251_DEFAULT_LOW_RSSI_DEPTH, ++ WL1251_ACX_LOW_RSSI_TYPE_EDGE); ++ if (ret < 0) ++ goto out; ++ wl->rssi_thold = bss_conf->cqm_rssi_thold; ++ } ++ + if (changed & BSS_CHANGED_BSSID) { + memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); + +@@ -1388,7 +1399,8 @@ int wl1251_init_ieee80211(struct wl1251 *wl) + wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | + IEEE80211_HW_SUPPORTS_PS | + IEEE80211_HW_BEACON_FILTER | +- IEEE80211_HW_SUPPORTS_UAPSD; ++ IEEE80211_HW_SUPPORTS_UAPSD | ++ IEEE80211_HW_SUPPORTS_CQM_RSSI; + + wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); + wl->hw->wiphy->max_scan_ssids = 1; +@@ -1456,6 +1468,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) + wl->psm_requested = false; + wl->tx_queue_stopped = false; + wl->power_level = WL1251_DEFAULT_POWER_LEVEL; ++ wl->rssi_thold = 0; + wl->beacon_int = WL1251_DEFAULT_BEACON_INT; + wl->dtim_period = WL1251_DEFAULT_DTIM_PERIOD; + wl->vif = NULL; +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h | ||
[-] [+] | Added | linux-2.6.39-0003-wl1251-remove-wl1251_ps_set_elp-function.patch ^ |
@@ -0,0 +1,84 @@ +From d96dbe47537fad4c708c7433bd67dfabc870d540 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Sun, 6 Mar 2011 19:23:36 +0200 +Subject: [PATCH 3/6] wl1251: remove wl1251_ps_set_elp function + +wl1251_ps_set_elp() only does acx_sleep_auth call and takes the chip +from/to ELP, however all callers of wl1251_ps_set_mode() have already +taken the chip out of ELP and puts it back to ELP when they finish. +This makes ELP calls (and register writes they result in) superfluous. + +So remove wl1251_ps_set_elp function and call acx_sleep_auth directly. + +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/ps.c | 37 +++---------------------------------- + 1 files changed, 3 insertions(+), 34 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c +index 9ba23ed..842155e 100644 +--- a/drivers/net/wireless/wl1251/ps.c ++++ b/drivers/net/wireless/wl1251/ps.c +@@ -102,38 +102,6 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl) + return 0; + } + +-static int wl1251_ps_set_elp(struct wl1251 *wl, bool enable) +-{ +- int ret; +- +- if (enable) { +- wl1251_debug(DEBUG_PSM, "sleep auth psm/elp"); +- +- ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); +- if (ret < 0) +- return ret; +- +- wl1251_ps_elp_sleep(wl); +- } else { +- wl1251_debug(DEBUG_PSM, "sleep auth cam"); +- +- /* +- * When the target is in ELP, we can only +- * access the ELP control register. Thus, +- * we have to wake the target up before +- * changing the power authorization. +- */ +- +- wl1251_ps_elp_wakeup(wl); +- +- ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_CAM); +- if (ret < 0) +- return ret; +- } +- +- return 0; +-} +- + int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + { + int ret; +@@ -162,7 +130,7 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + if (ret < 0) + return ret; + +- ret = wl1251_ps_set_elp(wl, true); ++ ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); + if (ret < 0) + return ret; + +@@ -171,7 +139,8 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + case STATION_ACTIVE_MODE: + default: + wl1251_debug(DEBUG_PSM, "leaving psm"); +- ret = wl1251_ps_set_elp(wl, false); ++ ++ ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_CAM); + if (ret < 0) + return ret; + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-0004-wl1251-fix-elp_work-race-condition.patch ^ |
@@ -0,0 +1,49 @@ +From cecde56fd7e93226aeed0ebe97523946a5e59ea5 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Sun, 6 Mar 2011 19:23:37 +0200 +Subject: [PATCH 4/6] wl1251: fix elp_work race condition + +While working on PS I've noticed elp_work is kicking rather often, and +sometimes the chip is put to sleep before 5ms delay expires. This +seems to happen because by the time wl1251_ps_elp_wakeup is called +elp_work might still be pending. After wakeup is done, the processing +may take some time, during which 5ms might expire and elp_work might +get scheduled. In this case, ss soon as 1st thread finishes work and +releases the mutex, elp_work will then put the device to sleep without +5ms delay. In addition 1st thread will queue additional elp_work +needlessly. + +Fix this by cancelling work in wl1251_ps_elp_wakeup instead. + +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/ps.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c +index 842155e..9cc5147 100644 +--- a/drivers/net/wireless/wl1251/ps.c ++++ b/drivers/net/wireless/wl1251/ps.c +@@ -58,7 +58,6 @@ void wl1251_ps_elp_sleep(struct wl1251 *wl) + unsigned long delay; + + if (wl->psm) { +- cancel_delayed_work(&wl->elp_work); + delay = msecs_to_jiffies(ELP_ENTRY_DELAY); + ieee80211_queue_delayed_work(wl->hw, &wl->elp_work, delay); + } +@@ -69,6 +68,9 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl) + unsigned long timeout, start; + u32 elp_reg; + ++ if (delayed_work_pending(&wl->elp_work)) ++ cancel_delayed_work(&wl->elp_work); ++ + if (!wl->elp) + return 0; + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-0005-wl1251-Prepare-for-idle-mode-support.patch ^ |
@@ -0,0 +1,207 @@ +From caf0914fa216ce3101f32e23ca02c89009de40b7 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Mon, 4 Apr 2011 11:04:57 +0300 +Subject: [PATCH 5/6] wl1251: Prepare for idle mode support + +RFC for WL1251 idle mode support brought a few issues that are worth to +update before adding the idle mode support. + +Since the idle mode can reuse the code that is now used in Power Save Mode +(PSM), the flag psm in struct wl1251 is changed to variable station_mode +to be able to distinguish between PSM and idle modes. + +As the station mode is different than the power power save mode command +that is sent to chip, the enum wl1251_cmd_ps_mod values are used only when +communicating with the chip and new enum wl1251_station_mode values are used +inside the driver. + +Confusing comment about psm and elp relation is removed since the PSM is +actually activated by putting the chip into Entreme Low Power (ELP) mode. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/cmd.h | 4 ++-- + drivers/net/wireless/wl1251/event.c | 6 ++++-- + drivers/net/wireless/wl1251/main.c | 6 +++--- + drivers/net/wireless/wl1251/ps.c | 14 ++++++-------- + drivers/net/wireless/wl1251/ps.h | 2 +- + drivers/net/wireless/wl1251/wl1251.h | 8 ++++++-- + 6 files changed, 22 insertions(+), 18 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/cmd.h b/drivers/net/wireless/wl1251/cmd.h +index e5c74c6..79ca527 100644 +--- a/drivers/net/wireless/wl1251/cmd.h ++++ b/drivers/net/wireless/wl1251/cmd.h +@@ -313,8 +313,8 @@ struct wl1251_cmd_vbm_update { + } __packed; + + enum wl1251_cmd_ps_mode { +- STATION_ACTIVE_MODE, +- STATION_POWER_SAVE_MODE ++ CHIP_ACTIVE_MODE, ++ CHIP_POWER_SAVE_MODE + }; + + struct wl1251_cmd_ps_params { +diff --git a/drivers/net/wireless/wl1251/event.c b/drivers/net/wireless/wl1251/event.c +index dfc4579..9f15cca 100644 +--- a/drivers/net/wireless/wl1251/event.c ++++ b/drivers/net/wireless/wl1251/event.c +@@ -68,14 +68,16 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) + if (vector & BSS_LOSE_EVENT_ID) { + wl1251_debug(DEBUG_EVENT, "BSS_LOSE_EVENT"); + +- if (wl->psm_requested && wl->psm) { ++ if (wl->psm_requested && ++ wl->station_mode != STATION_ACTIVE_MODE) { + ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); + if (ret < 0) + return ret; + } + } + +- if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && wl->psm) { ++ if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && ++ wl->station_mode != STATION_ACTIVE_MODE) { + wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); + + /* indicate to the stack, that beacons have been lost */ +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index e47c124..705a406 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -577,7 +577,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw) + wl->rx_last_id = 0; + wl->next_tx_complete = 0; + wl->elp = false; +- wl->psm = 0; ++ wl->station_mode = STATION_ACTIVE_MODE; + wl->tx_queue_stopped = false; + wl->power_level = WL1251_DEFAULT_POWER_LEVEL; + wl->rssi_thold = 0; +@@ -712,7 +712,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) + + wl->psm_requested = false; + +- if (wl->psm) { ++ if (wl->station_mode != STATION_ACTIVE_MODE) { + ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); + if (ret < 0) + goto out_sleep; +@@ -1464,7 +1464,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) + wl->rx_config = WL1251_DEFAULT_RX_CONFIG; + wl->rx_filter = WL1251_DEFAULT_RX_FILTER; + wl->elp = false; +- wl->psm = 0; ++ wl->station_mode = STATION_ACTIVE_MODE; + wl->psm_requested = false; + wl->tx_queue_stopped = false; + wl->power_level = WL1251_DEFAULT_POWER_LEVEL; +diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c +index 9cc5147..97a5b8c 100644 +--- a/drivers/net/wireless/wl1251/ps.c ++++ b/drivers/net/wireless/wl1251/ps.c +@@ -39,7 +39,7 @@ void wl1251_elp_work(struct work_struct *work) + + mutex_lock(&wl->mutex); + +- if (wl->elp || !wl->psm) ++ if (wl->elp || wl->station_mode == STATION_ACTIVE_MODE) + goto out; + + wl1251_debug(DEBUG_PSM, "chip to elp"); +@@ -57,7 +57,7 @@ void wl1251_ps_elp_sleep(struct wl1251 *wl) + { + unsigned long delay; + +- if (wl->psm) { ++ if (wl->station_mode != STATION_ACTIVE_MODE) { + delay = msecs_to_jiffies(ELP_ENTRY_DELAY); + ieee80211_queue_delayed_work(wl->hw, &wl->elp_work, delay); + } +@@ -104,7 +104,7 @@ int wl1251_ps_elp_wakeup(struct wl1251 *wl) + return 0; + } + +-int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) ++int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode) + { + int ret; + +@@ -128,15 +128,13 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + if (ret < 0) + return ret; + +- ret = wl1251_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE); ++ ret = wl1251_cmd_ps_mode(wl, CHIP_POWER_SAVE_MODE); + if (ret < 0) + return ret; + + ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); + if (ret < 0) + return ret; +- +- wl->psm = 1; + break; + case STATION_ACTIVE_MODE: + default: +@@ -163,13 +161,13 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode) + if (ret < 0) + return ret; + +- ret = wl1251_cmd_ps_mode(wl, STATION_ACTIVE_MODE); ++ ret = wl1251_cmd_ps_mode(wl, CHIP_ACTIVE_MODE); + if (ret < 0) + return ret; + +- wl->psm = 0; + break; + } ++ wl->station_mode = mode; + + return ret; + } +diff --git a/drivers/net/wireless/wl1251/ps.h b/drivers/net/wireless/wl1251/ps.h +index 55c3dda..75efad2 100644 +--- a/drivers/net/wireless/wl1251/ps.h ++++ b/drivers/net/wireless/wl1251/ps.h +@@ -26,7 +26,7 @@ + #include "wl1251.h" + #include "acx.h" + +-int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_cmd_ps_mode mode); ++int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode); + void wl1251_ps_elp_sleep(struct wl1251 *wl); + int wl1251_ps_elp_wakeup(struct wl1251 *wl); + void wl1251_elp_work(struct work_struct *work); +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h +index 13d66d6..502ab94 100644 +--- a/drivers/net/wireless/wl1251/wl1251.h ++++ b/drivers/net/wireless/wl1251/wl1251.h +@@ -129,6 +129,11 @@ enum wl1251_partition_type { + PART_TABLE_LEN + }; + ++enum wl1251_station_mode { ++ STATION_ACTIVE_MODE, ++ STATION_POWER_SAVE_MODE, ++}; ++ + struct wl1251_partition { + u32 size; + u32 start; +@@ -357,8 +362,7 @@ struct wl1251 { + + struct delayed_work elp_work; + +- /* we can be in psm, but not in elp, we have to differentiate */ | ||
[-] [+] | Added | linux-2.6.39-0006-wl1251-Add-support-for-idle-mode.patch ^ |
@@ -0,0 +1,99 @@ +From effb0537a158e4cd1e4f5ecc1ac00b1a9e34f60d Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Mon, 4 Apr 2011 11:04:58 +0300 +Subject: [PATCH 6/6] wl1251: Add support for idle mode + +On Nokia N900 the wl1251 consumes the most power when the interface is up +but not associated to access point (that supports PSM). In terms of battery +current consumption, the consumption is ~180 mA higher when the interface is +up but not associated and only ~5 mA higher when associated compared to +interface down and driver not loaded cases. + +This patch adds support for the mac80211 idle notifications. Chip is put into +idle very much the same way when entering into PSM by utilizing the Extreme +Low Power (ELP) mode. I.e. idle is entered by setting necessary conditions +in wl1251_ps_set_mode followed by a call to wl1251_ps_elp_sleep. + +It seems it is just enough the authorize ELP mode followed by +CMD_DISCONNECT (thanks to Kalle Valo about the idea to use it). +Without disconnect command the chip remains somewhat active and stays +consuming ~20 mA. Idle mode is left by same way than PSM. The wl1251_join +call is used to revert the CMD_DISCONNECT. Without it association to AP +doesn't work when trying second time. + +With this patch the interface up but not associated case the battery current +consumption is less than 1 mA higher compared to interface down case. + +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/main.c | 16 ++++++++++++++++ + drivers/net/wireless/wl1251/ps.c | 11 +++++++++++ + drivers/net/wireless/wl1251/wl1251.h | 1 + + 3 files changed, 28 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index 705a406..413f7b6 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -719,6 +719,22 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) + } + } + ++ if (changed & IEEE80211_CONF_CHANGE_IDLE) { ++ if (conf->flags & IEEE80211_CONF_IDLE) { ++ ret = wl1251_ps_set_mode(wl, STATION_IDLE); ++ if (ret < 0) ++ goto out_sleep; ++ } else { ++ ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); ++ if (ret < 0) ++ goto out_sleep; ++ ret = wl1251_join(wl, wl->bss_type, wl->channel, ++ wl->beacon_int, wl->dtim_period); ++ if (ret < 0) ++ goto out_sleep; ++ } ++ } ++ + if (conf->power_level != wl->power_level) { + ret = wl1251_acx_tx_power(wl, conf->power_level); + if (ret < 0) +diff --git a/drivers/net/wireless/wl1251/ps.c b/drivers/net/wireless/wl1251/ps.c +index 97a5b8c..db719f7 100644 +--- a/drivers/net/wireless/wl1251/ps.c ++++ b/drivers/net/wireless/wl1251/ps.c +@@ -136,6 +136,17 @@ int wl1251_ps_set_mode(struct wl1251 *wl, enum wl1251_station_mode mode) + if (ret < 0) + return ret; + break; ++ case STATION_IDLE: ++ wl1251_debug(DEBUG_PSM, "entering idle"); ++ ++ ret = wl1251_acx_sleep_auth(wl, WL1251_PSM_ELP); ++ if (ret < 0) ++ return ret; ++ ++ ret = wl1251_cmd_template_set(wl, CMD_DISCONNECT, NULL, 0); ++ if (ret < 0) ++ return ret; ++ break; + case STATION_ACTIVE_MODE: + default: + wl1251_debug(DEBUG_PSM, "leaving psm"); +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h +index 502ab94..b7c777f 100644 +--- a/drivers/net/wireless/wl1251/wl1251.h ++++ b/drivers/net/wireless/wl1251/wl1251.h +@@ -132,6 +132,7 @@ enum wl1251_partition_type { + enum wl1251_station_mode { + STATION_ACTIVE_MODE, + STATION_POWER_SAVE_MODE, ++ STATION_IDLE, + }; + + struct wl1251_partition { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-ASoC-omap-rx51-Enable-McBSP2-sidetone.patch ^ |
@@ -0,0 +1,48 @@ +From 58c5dfb931c766e8e2a472e1217b559c9cbc5ca7 Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula <jhnikula@gmail.com> +Date: Thu, 10 Mar 2011 09:13:24 +0200 +Subject: [PATCH] ASoC: omap: rx51: Enable McBSP2 sidetone + +McBSP sidetone is needed in telephony applications. McBSP sidetone is a +configurable FIR filter that forms a loopback from McBSP input to output. +This patch enables the McBSP2 sidetone ALSA controls so that it can be used +on Nokia RX-51/N900. + +Sidetone feature can be tested with following commands: + + (set up codec input and output paths) + # Enable and configure sidetone + amixer -D hw:0 set 'McBSP2 Sidetone' on + amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767 + echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps + # Do not loop audio via CPU + arecord -f dat >/dev/null |aplay /dev/zero + +[jhnikula@gmail.com: This is for MeeGo N900 2.6.37. This is in API wise the +same than upstream commit fa4d1f5 that is queued for 2.6.39 but just manually +applied. Upstream version conflicts with the hacks here. Those hacks can be +dropped completely once kernel is upgraded to 2.6.38 and by applying a few +rx51.c patches from 2.6.39.] +Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> +--- + sound/soc/omap/rx51.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c +index 6a4a894..2fd37b8 100644 +--- a/sound/soc/omap/rx51.c ++++ b/sound/soc/omap/rx51.c +@@ -369,6 +369,10 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) + tpa6130a2_add_controls(codec); + snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); + ++ err = omap_mcbsp_st_add_controls(codec, 1); ++ if (err < 0) ++ return err; ++ + aic34b_add_controls(codec); + + /* Set up RX-51 specific audio path audio_map */ +-- +1.7.2.3 + | ||
[-] [+] | Added | linux-2.6.39-RX-51-Enable-isp1704-power-on-off.patch ^ |
@@ -0,0 +1,86 @@ +From 9834f0f011cc12519c4811391b800a8754d2f08b Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Tue, 29 Mar 2011 16:59:52 +0200 +Subject: [PATCH 2/2] RX-51: Enable isp1704 power on/off + +The isp1704 usb tranceiver is used for charging and can be +disabled when not in use. Provide the powering routine to +the driver via platform data. + +Also changed the indent of ".name" variable in rx51_charger_device +definition to use tabs same way as the new ".dev" variable indent. +Put this in the same patch since the indent fix is only needed +when there are multiple members in the struct definition. + +Loosely based on earlier patches from Heikki Krogerus in +Nokia N900 maemo kernel. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Cc: Heikki Krogerus <heikki.krogerus@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 27 ++++++++++++++++++++++++- + 1 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index 2252f87..cddf645 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -31,6 +31,7 @@ + #include <linux/hsi/hsi.h> + #include <linux/cmt.h> + #include <linux/irq.h> ++#include <linux/power/isp1704_charger.h> + + #include <plat/mcspi.h> + #include <plat/board.h> +@@ -74,6 +75,8 @@ + + #define RX51_LP5523_CHIP_EN_GPIO 41 + ++#define RX51_USB_TRANSCEIVER_RST_GPIO 67 ++ + /* list all spi devices here */ + enum { + RX51_SPI_WL1251, +@@ -277,10 +280,30 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { + }, + }; + ++static void rx51_charger_set_power(bool on) ++{ ++ gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on); ++} ++ ++static struct isp1704_charger_data rx51_charger_data = { ++ .set_power = rx51_charger_set_power, ++}; ++ + static struct platform_device rx51_charger_device = { +- .name = "isp1704_charger", ++ .name = "isp1704_charger", ++ .dev = { ++ .platform_data = &rx51_charger_data, ++ }, + }; + ++static void __init rx51_charger_init(void) ++{ ++ WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO, ++ GPIOF_OUT_INIT_LOW, "isp1704_reset")); ++ ++ platform_device_register(&rx51_charger_device); ++} ++ + #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) + + #define RX51_GPIO_CAMERA_LENS_COVER 110 +@@ -1404,5 +1427,5 @@ void __init rx51_peripherals_init(void) + spi_register_board_info(rx51_peripherals_spi_board_info, + ARRAY_SIZE(rx51_peripherals_spi_board_info)); + omap2_hsmmc_init(mmc); +- platform_device_register(&rx51_charger_device); ++ rx51_charger_init(); + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-Staging-zram-initialize-device-on-first-read.patch ^ |
@@ -0,0 +1,74 @@ +From 58cb85c0fa018a53b3f42d95dc99355b6bd5017c Mon Sep 17 00:00:00 2001 +From: Jerome Marchand <jmarchan@redhat.com> +Date: Thu, 17 Feb 2011 17:11:49 +0100 +Subject: [PATCH] Staging: zram: initialize device on first read + +Currently the device is initialized when first write is done to the +device. Any read attempt before the first write would fail, including +"hidden" read the user may not know about (as for example if he tries +to write a partial block). + +This patch initializes the device on first request, whether read or +write. + +Signed-off-by: Jerome Marchand <jmarchan@redhat.com> +Cc: Nitin Gupta <ngupta@vflare.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_drv.c | 19 +++++++------------ + 1 files changed, 7 insertions(+), 12 deletions(-) + +diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c +index cf5fa72..46d4585 100644 +--- a/drivers/staging/zram/zram_drv.c ++++ b/drivers/staging/zram/zram_drv.c +@@ -207,11 +207,6 @@ static void zram_read(struct zram *zram, struct bio *bio) + u32 index; + struct bio_vec *bvec; + +- if (unlikely(!zram->init_done)) { +- bio_endio(bio, -ENXIO); +- return; +- } +- + zram_stat64_inc(zram, &zram->stats.num_reads); + index = bio->bi_sector >> SECTORS_PER_PAGE_SHIFT; + +@@ -282,20 +277,15 @@ out: + + static void zram_write(struct zram *zram, struct bio *bio) + { +- int i, ret; ++ int i; + u32 index; + struct bio_vec *bvec; + +- if (unlikely(!zram->init_done)) { +- ret = zram_init_device(zram); +- if (ret) +- goto out; +- } +- + zram_stat64_inc(zram, &zram->stats.num_writes); + index = bio->bi_sector >> SECTORS_PER_PAGE_SHIFT; + + bio_for_each_segment(bvec, bio, i) { ++ int ret; + u32 offset; + size_t clen; + struct zobj_header *zheader; +@@ -441,6 +431,11 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio) + return 0; + } + ++ if (unlikely(!zram->init_done) && zram_init_device(zram)) { ++ bio_io_error(bio); ++ return 0; ++ } ++ + switch (bio_data_dir(bio)) { + case READ: + zram_read(zram, bio); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-Staging-zram-make-zram_read-return-a-bio-error-if-th.patch ^ |
@@ -0,0 +1,32 @@ +From 24189776e2e2026855c061e3487998dbb864e145 Mon Sep 17 00:00:00 2001 +From: Jerome Marchand <jmarchan@redhat.com> +Date: Fri, 17 Dec 2010 17:03:15 +0100 +Subject: [PATCH] Staging: zram: make zram_read return a bio error if the device is not initialized + +Make zram_read() return a bio error if the device is not initialized +instead of pretending nothing happened. + +Signed-off-by: Jerome Marchand <jmarchan@redhat.com> +Acked-by: Jeff Moyer <jmoyer@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_drv.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c +index 080e85f..2a18c81 100644 +--- a/drivers/staging/zram/zram_drv.c ++++ b/drivers/staging/zram/zram_drv.c +@@ -208,8 +208,7 @@ static int zram_read(struct zram *zram, struct bio *bio) + struct bio_vec *bvec; + + if (unlikely(!zram->init_done)) { +- set_bit(BIO_UPTODATE, &bio->bi_flags); +- bio_endio(bio, 0); ++ bio_endio(bio, -ENXIO); + return 0; + } + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-Staging-zram-round-up-the-disk-size-provided-by-user.patch ^ |
@@ -0,0 +1,39 @@ +From 97e2dc899468c1b1ccc2d63a2963edb292abbb6f Mon Sep 17 00:00:00 2001 +From: Jerome Marchand <jmarchan@redhat.com> +Date: Fri, 17 Dec 2010 17:02:28 +0100 +Subject: [PATCH] Staging: zram: round up the disk size provided by user + +Currently disksize_store() round down the disk size provided by user. +This is probably not what one would expect, so round up instead. + +Signed-off-by: Jerome Marchand <jmarchan@redhat.com> +Acked-by: Jeff Moyer <jmoyer@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_sysfs.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/staging/zram/zram_sysfs.c b/drivers/staging/zram/zram_sysfs.c +index 6b3cf00..0335a2d 100644 +--- a/drivers/staging/zram/zram_sysfs.c ++++ b/drivers/staging/zram/zram_sysfs.c +@@ -14,6 +14,7 @@ + + #include <linux/device.h> + #include <linux/genhd.h> ++#include <linux/mm.h> + + #include "zram_drv.h" + +@@ -67,7 +68,7 @@ static ssize_t disksize_store(struct device *dev, + if (ret) + return ret; + +- zram->disksize &= PAGE_MASK; ++ zram->disksize = PAGE_ALIGN(zram->disksize); + set_capacity(zram->disk, zram->disksize >> SECTOR_SHIFT); + + return len; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-Staging-zram-simplify-zram_make_request.patch ^ |
@@ -0,0 +1,98 @@ +From 82ded22eeeecce16faaa20f7de66932f2c88e129 Mon Sep 17 00:00:00 2001 +From: Nitin Gupta <ngupta@vflare.org> +Date: Sat, 22 Jan 2011 07:36:15 -0500 +Subject: [PATCH] Staging: zram: simplify zram_make_request + +zram_read() and zram_write() always return zero, so make them return +void to simplify the code. + +Signed-off-by: Nitin Gupta <ngupta@vflare.org> +Signed-off-by: Jerome Marchand <jmarchan@redhat.com> +Acked-by: Jeff Moyer <jmoyer@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_drv.c | 19 ++++++++----------- + 1 files changed, 8 insertions(+), 11 deletions(-) + +diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c +index 2a18c81..b001760 100644 +--- a/drivers/staging/zram/zram_drv.c ++++ b/drivers/staging/zram/zram_drv.c +@@ -200,7 +200,7 @@ static void handle_uncompressed_page(struct zram *zram, + flush_dcache_page(page); + } + +-static int zram_read(struct zram *zram, struct bio *bio) ++static void zram_read(struct zram *zram, struct bio *bio) + { + + int i; +@@ -209,7 +209,7 @@ static int zram_read(struct zram *zram, struct bio *bio) + + if (unlikely(!zram->init_done)) { + bio_endio(bio, -ENXIO); +- return 0; ++ return; + } + + zram_stat64_inc(zram, &zram->stats.num_reads); +@@ -274,14 +274,13 @@ static int zram_read(struct zram *zram, struct bio *bio) + + set_bit(BIO_UPTODATE, &bio->bi_flags); + bio_endio(bio, 0); +- return 0; ++ return; + + out: + bio_io_error(bio); +- return 0; + } + +-static int zram_write(struct zram *zram, struct bio *bio) ++static void zram_write(struct zram *zram, struct bio *bio) + { + int i, ret; + u32 index; +@@ -406,11 +405,10 @@ memstore: + + set_bit(BIO_UPTODATE, &bio->bi_flags); + bio_endio(bio, 0); +- return 0; ++ return; + + out: + bio_io_error(bio); +- return 0; + } + + /* +@@ -435,7 +433,6 @@ static inline int valid_io_request(struct zram *zram, struct bio *bio) + */ + static int zram_make_request(struct request_queue *queue, struct bio *bio) + { +- int ret = 0; + struct zram *zram = queue->queuedata; + + if (!valid_io_request(zram, bio)) { +@@ -446,15 +443,15 @@ static int zram_make_request(struct request_queue *queue, struct bio *bio) + + switch (bio_data_dir(bio)) { + case READ: +- ret = zram_read(zram, bio); ++ zram_read(zram, bio); + break; + + case WRITE: +- ret = zram_write(zram, bio); ++ zram_write(zram, bio); + break; + } + +- return ret; ++ return 0; + } + + void zram_reset_device(struct zram *zram) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-bq27x00-battery-status-monitoring-backport.patch ^ |
@@ -0,0 +1,1190 @@ +From 8dee21683a279ef95d641d6b433f2b9321bfcb54 Mon Sep 17 00:00:00 2001 +From: Mika Laitio <ext-mika.1.laitio@nokia.com> +Date: Mon, 28 Mar 2011 12:03:29 +0300 +Subject: [PATCH 2/3] bq27x00: battery status monitoring backport +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Backported bq27x00 related battery driver changes from Linus Torvald's +git tree for 2.6.39. Driver provides standard battery sysfs entry for +reading battery charge status related data in n900 from +/sys/class/power_supply/bq27200-0 + +Original message description from Lars-Peter Clausen: + +This patch series contains a few updates for the bq27x00 driver: +* Support for additional power supply properties +* Support for the bq27000 battery which is identical to the bq27200 but +* is + connected through the HDQ bus. +* Adds a register cache to the driver and introduces polling the +* batteries state +* Minor improvements and cleanups + +The last patch in this series is not specific to the bq27x00 driver but +is required for uevents to be generated properly for this driver. +The patch makes properties which return -ENODATA to be ignored when +generating uevents. Previously in such a case uevent generation would +have been +aborted with an error. But since the bq27x00 return -ENODATA for the +TIME_TO_FULL property when the battery is not charging and for the +TIME_TO_EMPTY +property when the battery is not discharging and at least one of them is +always +true uevent generation would always fail. + +This series has so far been tested with the bq27000 and the bq27200 +battery, but not with the bq27500 battery, so it would be nice if +somebody with a +board containing such a battery could test the patches to make sure that +there +are no regressions. + +Lars-Peter Clausen (10): + POWER: bq27x00: Add type property + POWER: bq27x00: Improve temperature precession + POWER: bq27x00: Return -ENODEV for properties if the battery is not + present + POWER: bq27x00: Prepare code for addition of bq27000 platform driver + POWER: bq27x00: Add bq27000 support + POWER: bq27X00: Cache battery registers + POWER: bq27x00: Poll battery state + POWER: bq27x00: Give more specific reports on battery status + POWER: bq27x00: Cleanup bq27x00_i2c_read + POWER: Ignore -ENODATA errors when generating a uevent + +Pali Rohár (4): + POWER: bq27x00: Fix current now property + POWER: bq27x00: Add new properties + POWER: bq27x00: Add MODULE_DEVICE_TABLE + POWER: bq27x00: Minor cleanups + +Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> +Tested-by: Mika Laitio <ext-mika.1.laitio@nokia.com> +--- + drivers/power/Kconfig | 34 ++ + drivers/power/bq27x00_battery.c | 725 +++++++++++++++++++++++++-------- + drivers/power/power_supply_core.c | 10 +- + drivers/power/power_supply_sysfs.c | 2 +- + include/linux/power/bq27x00_battery.h | 19 + + 5 files changed, 616 insertions(+), 174 deletions(-) + create mode 100644 include/linux/power/bq27x00_battery.h + +diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig +index 60d83d9..52a462f 100644 +--- a/drivers/power/Kconfig ++++ b/drivers/power/Kconfig +@@ -117,10 +117,24 @@ config BATTERY_BQ20Z75 + + config BATTERY_BQ27x00 + tristate "BQ27x00 battery driver" ++ help ++ Say Y here to enable support for batteries with BQ27x00 (I2C/HDQ) chips. ++ ++config BATTERY_BQ27X00_I2C ++ bool "BQ27200/BQ27500 support" ++ depends on BATTERY_BQ27x00 + depends on I2C ++ default y + help + Say Y here to enable support for batteries with BQ27x00 (I2C) chips. + ++config BATTERY_BQ27X00_PLATFORM ++ bool "BQ27000 support" ++ depends on BATTERY_BQ27x00 ++ default y ++ help ++ Say Y here to enable support for batteries with BQ27000 (HDQ) chips. ++ + config BATTERY_DA9030 + tristate "DA9030 battery driver" + depends on PMIC_DA903X +@@ -136,6 +150,16 @@ config BATTERY_MAX17040 + in handheld and portable equipment. The MAX17040 is configured + to operate with a single lithium cell + ++config BATTERY_MAX17042 ++ tristate "Maxim MAX17042/8997/8966 Fuel Gauge" ++ depends on I2C ++ help ++ MAX17042 is fuel-gauge systems for lithium-ion (Li+) batteries ++ in handheld and portable equipment. The MAX17042 is configured ++ to operate with a single lithium cell. MAX8997 and MAX8966 are ++ multi-function devices that include fuel gauages that are compatible ++ with MAX17042. ++ + config BATTERY_Z2 + tristate "Z2 battery driver" + depends on I2C && MACH_ZIPIT2 +@@ -185,4 +209,14 @@ config CHARGER_TWL4030 + help + Say Y here to enable support for TWL4030 Battery Charge Interface. + ++config CHARGER_GPIO ++ tristate "GPIO charger" ++ depends on GPIOLIB ++ help ++ Say Y to include support for chargers which report their online status ++ through a GPIO pin. ++ ++ This driver can be build as a module. If so, the module will be ++ called gpio-charger. ++ + endif # POWER_SUPPLY +diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c +index eff0273..59e68db 100644 +--- a/drivers/power/bq27x00_battery.c ++++ b/drivers/power/bq27x00_battery.c +@@ -3,6 +3,7 @@ + * + * Copyright (C) 2008 Rodolfo Giometti <giometti@linux.it> + * Copyright (C) 2008 Eurotech S.p.A. <info@eurotech.it> ++ * Copyright (C) 2010-2011 Lars-Peter Clausen <lars@metafoo.de> + * + * Based on a previous work by Copyright (C) 2008 Texas Instruments, Inc. + * +@@ -15,6 +16,13 @@ + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + */ ++ ++/* ++ * Datasheets: ++ * http://focus.ti.com/docs/prod/folders/print/bq27000.html ++ * http://focus.ti.com/docs/prod/folders/print/bq27500.html ++ */ ++ + #include <linux/module.h> + #include <linux/param.h> + #include <linux/jiffies.h> +@@ -27,7 +35,9 @@ + #include <linux/slab.h> + #include <asm/unaligned.h> + +-#define DRIVER_VERSION "1.1.0" ++#include <linux/power/bq27x00_battery.h> ++ ++#define DRIVER_VERSION "1.2.0" + + #define BQ27x00_REG_TEMP 0x06 + #define BQ27x00_REG_VOLT 0x08 +@@ -36,36 +46,59 @@ + #define BQ27x00_REG_TTE 0x16 + #define BQ27x00_REG_TTF 0x18 + #define BQ27x00_REG_TTECP 0x26 ++#define BQ27x00_REG_NAC 0x0C /* Nominal available capaciy */ ++#define BQ27x00_REG_LMD 0x12 /* Last measured discharge */ ++#define BQ27x00_REG_CYCT 0x2A /* Cycle count total */ ++#define BQ27x00_REG_AE 0x22 /* Available enery */ + + #define BQ27000_REG_RSOC 0x0B /* Relative State-of-Charge */ ++#define BQ27000_REG_ILMD 0x76 /* Initial last measured discharge */ + #define BQ27000_FLAG_CHGS BIT(7) ++#define BQ27000_FLAG_FC BIT(5) + +-#define BQ27500_REG_SOC 0x2c ++#define BQ27500_REG_SOC 0x2C ++#define BQ27500_REG_DCAP 0x3C /* Design capacity */ + #define BQ27500_FLAG_DSC BIT(0) + #define BQ27500_FLAG_FC BIT(9) + +-/* If the system has several batteries we need a different name for each +- * of them... +- */ +-static DEFINE_IDR(battery_id); +-static DEFINE_MUTEX(battery_mutex); ++#define BQ27000_RS 20 /* Resistor sense */ + + struct bq27x00_device_info; | ||
[-] [+] | Added | linux-2.6.39-isp1704_charger-allow-board-specific-powering-routin.patch ^ |
@@ -0,0 +1,152 @@ +From afafb024a80ae4bec660007112d91d53b3e0ee84 Mon Sep 17 00:00:00 2001 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Date: Tue, 29 Mar 2011 16:59:51 +0200 +Subject: [PATCH 1/2] isp1704_charger: allow board specific powering routine + +The ISP1704/1707 chip can be put to full power down +state by asserting the CHIP_SEL line. This patch enables +platform or board specific hooks to put the device into +power down mode in case not needed. + +This patch is a preparation for enabling this powering +routine in n900 (rx-51) devices. + +Thanks to Heikki Krogerus for helping out with the patch. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Cc: Heikki Krogerus <heikki.krogerus@nokia.com> +--- + drivers/power/isp1704_charger.c | 26 ++++++++++++++++++++++++++ + include/linux/power/isp1704_charger.h | 29 +++++++++++++++++++++++++++++ + 2 files changed, 55 insertions(+), 0 deletions(-) + create mode 100644 include/linux/power/isp1704_charger.h + +diff --git a/drivers/power/isp1704_charger.c b/drivers/power/isp1704_charger.c +index 44c92c6..e965ea4 100644 +--- a/drivers/power/isp1704_charger.c ++++ b/drivers/power/isp1704_charger.c +@@ -33,6 +33,7 @@ + #include <linux/usb/ulpi.h> + #include <linux/usb/ch9.h> + #include <linux/usb/gadget.h> ++#include <linux/power/isp1704_charger.h> + + /* Vendor specific Power Control register */ + #define ISP1704_PWR_CTRL 0x3d +@@ -63,6 +64,7 @@ struct isp1704_charger { + char model[8]; + unsigned present:1; + unsigned online:1; ++ unsigned init_done; + unsigned current_max; + + /* temp storage variables */ +@@ -71,6 +73,18 @@ struct isp1704_charger { + }; + + /* ++ * Disable/enable the power from the isp1704 if a function for it ++ * has been provided with platform data. ++ */ ++static void isp1704_charger_set_power(struct isp1704_charger *isp, bool on) ++{ ++ struct isp1704_charger_data *board = isp->dev->platform_data; ++ ++ if (board->set_power) ++ board->set_power(on); ++} ++ ++/* + * Determine is the charging port DCP (dedicated charger) or CDP (Host/HUB + * chargers). + * +@@ -225,6 +239,9 @@ static void isp1704_charger_work(struct work_struct *data) + + mutex_lock(&lock); + ++ if (event != USB_EVENT_NONE) ++ isp1704_charger_set_power(isp, 1); ++ + switch (event) { + case USB_EVENT_VBUS: + isp->online = true; +@@ -272,6 +289,9 @@ static void isp1704_charger_work(struct work_struct *data) + */ + if (isp->otg->gadget) + usb_gadget_disconnect(isp->otg->gadget); ++ ++ if (isp->init_done) ++ isp1704_charger_set_power(isp, 0); + break; + case USB_EVENT_ENUMERATED: + if (isp->present) +@@ -404,6 +424,8 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev) + isp->dev = &pdev->dev; + platform_set_drvdata(pdev, isp); + ++ isp1704_charger_set_power(isp, 1); ++ + ret = isp1704_test_ulpi(isp); + if (ret < 0) + goto fail1; +@@ -448,11 +470,14 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev) + + /* Detect charger if VBUS is valid (the cable was already plugged). */ + ret = otg_io_read(isp->otg, ULPI_USB_INT_STS); ++ isp1704_charger_set_power(isp, 0); + if ((ret & ULPI_INT_VBUS_VALID) && !isp->otg->default_a) { + isp->event = USB_EVENT_VBUS; + schedule_work(&isp->work); + } + ++ isp->init_done = 1; ++ + return 0; + fail2: + power_supply_unregister(&isp->psy); +@@ -473,6 +498,7 @@ static int __devexit isp1704_charger_remove(struct platform_device *pdev) + otg_unregister_notifier(isp->otg, &isp->nb); + power_supply_unregister(&isp->psy); + otg_put_transceiver(isp->otg); ++ isp1704_charger_set_power(isp, 0); + kfree(isp); + + return 0; +diff --git a/include/linux/power/isp1704_charger.h b/include/linux/power/isp1704_charger.h +new file mode 100644 +index 0000000..68096a6 +--- /dev/null ++++ b/include/linux/power/isp1704_charger.h +@@ -0,0 +1,29 @@ ++/* ++ * ISP1704 USB Charger Detection driver ++ * ++ * Copyright (C) 2011 Nokia Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ */ ++ ++ ++#ifndef __ISP1704_CHARGER_H ++#define __ISP1704_CHARGER_H ++ ++struct isp1704_charger_data { ++ void (*set_power)(bool on); ++}; ++ ++#endif +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-omap-rx51-Add-support-for-vibra.patch ^ |
@@ -0,0 +1,40 @@ +From 208813d859dbb3f07a20442209ddd19ba7910d1a Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Fri, 25 Feb 2011 10:17:56 +0200 +Subject: [PATCH] omap: rx51: Add support for vibra + +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + arch/arm/mach-omap2/board-rx51-peripherals.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c +index e75e240..dcd98fa 100644 +--- a/arch/arm/mach-omap2/board-rx51-peripherals.c ++++ b/arch/arm/mach-omap2/board-rx51-peripherals.c +@@ -699,6 +699,14 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { + .resource_config = twl4030_rconfig, + }; + ++struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { ++ .coexist = 0, ++}; ++ ++struct twl4030_codec_data rx51_codec_data __initdata = { ++ .audio_mclk = 26000000, ++ .vibra = &rx51_vibra_data, ++}; + + static struct twl4030_platform_data rx51_twldata __initdata = { + .irq_base = TWL4030_IRQ_BASE, +@@ -710,6 +718,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { + .madc = &rx51_madc_data, + .usb = &rx51_usb_data, + .power = &rx51_t2scripts_data, ++ .codec = &rx51_codec_data, + + .vaux1 = &rx51_vaux1, + .vaux2 = &rx51_vaux2, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-omap3-wdtimer-fix-core-idle-transition.patch ^ |
@@ -0,0 +1,40 @@ +From kalle.jokiniemi@nokia.com Fri Mar 11 11:37:13 2011 +Date: Fri, 11 Mar 2011 09:32:10 +0100 +From: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +To: ilkka.koskinen@nokia.com +Subject: [PATCH 2/2] OMAP3: wdtimer: Fix CORE idle transition + +From: Paul Walmsley <paul@pwsan.com> + +The HW superwised smart idle for wdtimer in OMAP3 prevents +CORE power domain idle transitions. Disable it by swithing +to SW supervised transitions. + +This could be a hardware bug in the OMAP3 wdtimer2 block. + +Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@nokia.com> +Signed-off-by: Paul Walmsley <paul@pwsan.com> +Cc: Benoit Cousson <b-cousson@ti.com> +--- + arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +index cb97ecf..c5b24d0 100644 +--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c ++++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +@@ -341,6 +341,11 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = { + .slaves = omap3xxx_wd_timer2_slaves, + .slaves_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_slaves), + .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), ++ /* ++ * XXX: Use software supervised mode, HW supervised smartidle seems to ++ * block CORE power domain idle transitions. Maybe a HW bug in wdt2? ++ */ ++ .flags = HWMOD_SWSUP_SIDLE, + }; + + /* UART common */ +-- +1.7.1 + | ||
[-] [+] | Added | linux-2.6.39-wireless-wl1251-Fix-potential-NULL-pointer-dereferen.patch ^ |
@@ -0,0 +1,34 @@ +From 9b74884f682df18e85eaaf7e82729e229ac919ce Mon Sep 17 00:00:00 2001 +From: Jesper Juhl <jj@chaosbits.net> +Date: Thu, 3 Feb 2011 20:14:01 +0100 +Subject: [PATCH] wireless, wl1251: Fix potential NULL pointer dereference in wl1251_op_bss_info_changed() + +wireless, wl1251: Fix potential NULL pointer dereference in wl1251_op_bss_info_changed() + +In drivers/net/wireless/wl1251/main.c:wl1251_op_bss_info_changed() we make +a call to ieee80211_beacon_get() which may return NULL, but we do not +check the return value before dereferencing the pointer. + +Signed-off-by: Jesper Juhl <jj@chaosbits.net> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/main.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index 56b3b78..fd85532 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -1147,6 +1147,9 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, + + if (changed & BSS_CHANGED_BEACON) { + beacon = ieee80211_beacon_get(hw, vif); ++ if (!beacon) ++ goto out_sleep; ++ + ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data, + beacon->len); + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-add-power-callback-to-wl1251_if_operations.patch ^ |
@@ -0,0 +1,134 @@ +From 6e30535e8c11de2b4af16547f2e08a88fedb553f Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Wed, 3 Nov 2010 22:13:47 +0200 +Subject: [PATCH] wl1251: add power callback to wl1251_if_operations + +wl1251: add power callback to wl1251_if_operations + +Call interface specific power callback before calling board specific +one. Also allow that callback to fail. This is how it's done for +wl1271 and will be used for runtime_pm support. + +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/main.c | 15 +++++++++------ + drivers/net/wireless/wl1251/sdio.c | 8 ++++++-- + drivers/net/wireless/wl1251/spi.c | 9 +++++++++ + drivers/net/wireless/wl1251/wl1251.h | 1 + + 4 files changed, 25 insertions(+), 8 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index 413f7b6..56b3b78 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -54,14 +54,14 @@ void wl1251_disable_interrupts(struct wl1251 *wl) + wl->if_ops->disable_irq(wl); + } + +-static void wl1251_power_off(struct wl1251 *wl) ++static int wl1251_power_off(struct wl1251 *wl) + { +- wl->set_power(false); ++ return wl->if_ops->power(wl, false); + } + +-static void wl1251_power_on(struct wl1251 *wl) ++static int wl1251_power_on(struct wl1251 *wl) + { +- wl->set_power(true); ++ return wl->if_ops->power(wl, true); + } + + static int wl1251_fetch_firmware(struct wl1251 *wl) +@@ -154,9 +154,12 @@ static void wl1251_fw_wakeup(struct wl1251 *wl) + + static int wl1251_chip_wakeup(struct wl1251 *wl) + { +- int ret = 0; ++ int ret; ++ ++ ret = wl1251_power_on(wl); ++ if (ret < 0) ++ return ret; + +- wl1251_power_on(wl); + msleep(WL1251_POWER_ON_SLEEP); + wl->if_ops->reset(wl); + +diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c +index 74ba9ce..0285190 100644 +--- a/drivers/net/wireless/wl1251/sdio.c ++++ b/drivers/net/wireless/wl1251/sdio.c +@@ -171,8 +171,12 @@ static void wl1251_disable_line_irq(struct wl1251 *wl) + return disable_irq(wl->irq); + } + +-static void wl1251_sdio_set_power(bool enable) ++static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) + { ++ if (wl->set_power) ++ wl->set_power(enable); ++ ++ return 0; + } + + static struct wl1251_if_operations wl1251_sdio_ops = { +@@ -181,6 +185,7 @@ static struct wl1251_if_operations wl1251_sdio_ops = { + .write_elp = wl1251_sdio_write_elp, + .read_elp = wl1251_sdio_read_elp, + .reset = wl1251_sdio_reset, ++ .power = wl1251_sdio_set_power, + }; + + static int wl1251_platform_probe(struct platform_device *pdev) +@@ -239,7 +244,6 @@ static int wl1251_sdio_probe(struct sdio_func *func, + wl_sdio->func = func; + wl->if_priv = wl_sdio; + wl->if_ops = &wl1251_sdio_ops; +- wl->set_power = wl1251_sdio_set_power; + + if (wl12xx_board_data != NULL) { + wl->set_power = wl12xx_board_data->set_power; +diff --git a/drivers/net/wireless/wl1251/spi.c b/drivers/net/wireless/wl1251/spi.c +index 88fa8e6..ac872b3 100644 +--- a/drivers/net/wireless/wl1251/spi.c ++++ b/drivers/net/wireless/wl1251/spi.c +@@ -215,12 +215,21 @@ static void wl1251_spi_disable_irq(struct wl1251 *wl) + return disable_irq(wl->irq); + } + ++static int wl1251_spi_set_power(struct wl1251 *wl, bool enable) ++{ ++ if (wl->set_power) ++ wl->set_power(enable); ++ ++ return 0; ++} ++ + static const struct wl1251_if_operations wl1251_spi_ops = { + .read = wl1251_spi_read, + .write = wl1251_spi_write, + .reset = wl1251_spi_reset_wake, + .enable_irq = wl1251_spi_enable_irq, + .disable_irq = wl1251_spi_disable_irq, ++ .power = wl1251_spi_set_power, + }; + + static int __devinit wl1251_spi_probe(struct spi_device *spi) +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h +index b7c777f..a7f98a7 100644 +--- a/drivers/net/wireless/wl1251/wl1251.h ++++ b/drivers/net/wireless/wl1251/wl1251.h +@@ -262,6 +262,7 @@ struct wl1251_if_operations { + void (*write)(struct wl1251 *wl, int addr, void *buf, size_t len); + void (*read_elp)(struct wl1251 *wl, int addr, u32 *val); + void (*write_elp)(struct wl1251 *wl, int addr, u32 val); ++ int (*power)(struct wl1251 *wl, bool enable); + void (*reset)(struct wl1251 *wl); + void (*enable_irq)(struct wl1251 *wl); + void (*disable_irq)(struct wl1251 *wl); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-add-runtime-PM-support-for-SDIO.patch ^ |
@@ -0,0 +1,131 @@ +From b4359ff073f37f8c16bc599c185577c71c473060 Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Mon, 8 Nov 2010 13:29:36 +0200 +Subject: [PATCH] wl1251: add runtime PM support for SDIO + +wl1251: add runtime PM support for SDIO + +Add runtime PM support, similar to how it's done for wl1271. +This allows to power down the card when the driver is loaded but +network is not in use. + +Cc: Ohad Ben-Cohen <ohad@wizery.com> +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/sdio.c | 64 ++++++++++++++++++++++++++++++++++-- + 1 files changed, 61 insertions(+), 3 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c +index 0285190..f3e185e 100644 +--- a/drivers/net/wireless/wl1251/sdio.c ++++ b/drivers/net/wireless/wl1251/sdio.c +@@ -26,6 +26,7 @@ + #include <linux/platform_device.h> + #include <linux/wl12xx.h> + #include <linux/irq.h> ++#include <linux/pm_runtime.h> + + #include "wl1251.h" + +@@ -173,10 +174,40 @@ static void wl1251_disable_line_irq(struct wl1251 *wl) + + static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) + { +- if (wl->set_power) +- wl->set_power(enable); ++ struct sdio_func *func = wl_to_func(wl); ++ int ret; + +- return 0; ++ if (enable) { ++ /* ++ * Power is controlled by runtime PM, but we still call board ++ * callback in case it wants to do any additional setup, ++ * for example enabling clock buffer for the module. ++ */ ++ if (wl->set_power) ++ wl->set_power(true); ++ ++ ret = pm_runtime_get_sync(&func->dev); ++ if (ret < 0) ++ goto out; ++ ++ sdio_claim_host(func); ++ sdio_enable_func(func); ++ sdio_release_host(func); ++ } else { ++ sdio_claim_host(func); ++ sdio_disable_func(func); ++ sdio_release_host(func); ++ ++ ret = pm_runtime_put_sync(&func->dev); ++ if (ret < 0) ++ goto out; ++ ++ if (wl->set_power) ++ wl->set_power(false); ++ } ++ ++out: ++ return ret; + } + + static struct wl1251_if_operations wl1251_sdio_ops = { +@@ -277,6 +308,10 @@ static int wl1251_sdio_probe(struct sdio_func *func, + goto out_free_irq; + + sdio_set_drvdata(func, wl); ++ ++ /* Tell PM core that we don't need the card to be powered now */ ++ pm_runtime_put_noidle(&func->dev); ++ + return ret; + + out_free_irq: +@@ -298,6 +333,9 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func) + struct wl1251 *wl = sdio_get_drvdata(func); + struct wl1251_sdio *wl_sdio = wl->if_priv; + ++ /* Undo decrement done above in wl1251_probe */ ++ pm_runtime_get_noresume(&func->dev); ++ + if (wl->irq) + free_irq(wl->irq, wl); + kfree(wl_sdio); +@@ -309,11 +347,31 @@ static void __devexit wl1251_sdio_remove(struct sdio_func *func) + sdio_release_host(func); + } + ++static int wl1251_suspend(struct device *dev) ++{ ++ /* ++ * Tell MMC/SDIO core it's OK to power down the card ++ * (if it isn't already), but not to remove it completely. ++ */ ++ return 0; ++} ++ ++static int wl1251_resume(struct device *dev) ++{ ++ return 0; ++} ++ ++static const struct dev_pm_ops wl1251_sdio_pm_ops = { ++ .suspend = wl1251_suspend, ++ .resume = wl1251_resume, ++}; ++ + static struct sdio_driver wl1251_sdio_driver = { + .name = "wl1251_sdio", + .id_table = wl1251_devices, + .probe = wl1251_sdio_probe, + .remove = __devexit_p(wl1251_sdio_remove), ++ .drv.pm = &wl1251_sdio_pm_ops, + }; + + static int __init wl1251_sdio_init(void) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-enable-adhoc-mode.patch ^ |
@@ -0,0 +1,33 @@ +From b3c6fe2f18d14823630ae57365dadd4e70b6d51e Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 19:11:04 +0100 +Subject: [PATCH] wl1251: enable adhoc mode + +wl1251: enable adhoc mode + +Enable adhoc support in wl1251 driver. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/main.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c +index fd85532..a2e2f6b 100644 +--- a/drivers/net/wireless/wl1251/main.c ++++ b/drivers/net/wireless/wl1251/main.c +@@ -1424,7 +1424,8 @@ int wl1251_init_ieee80211(struct wl1251 *wl) + IEEE80211_HW_SUPPORTS_UAPSD | + IEEE80211_HW_SUPPORTS_CQM_RSSI; + +- wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); ++ wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | ++ BIT(NL80211_IFTYPE_ADHOC); + wl->hw->wiphy->max_scan_ssids = 1; + wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1251_band_2ghz; + +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-remove-unnecessary-import.patch ^ |
@@ -0,0 +1,31 @@ +From 2f2bd925bfe5890e2d510a04de208bad61eedef6 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Tue, 21 Dec 2010 01:01:50 +0100 +Subject: [PATCH] wl1251: remove unnecessary import + +wl1251: remove unnecessary import + +No function declared in gpio.h is used here. + +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/boot.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/boot.c b/drivers/net/wireless/wl1251/boot.c +index 61572df..d729daf 100644 +--- a/drivers/net/wireless/wl1251/boot.c ++++ b/drivers/net/wireless/wl1251/boot.c +@@ -19,7 +19,6 @@ + * + */ + +-#include <linux/gpio.h> + #include <linux/slab.h> + + #include "reg.h" +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-set-rate-index-and-preamble-flag-on-received-.patch ^ |
@@ -0,0 +1,78 @@ +From 251581991c64c5527f4ffeb398453cf8a9ff835d Mon Sep 17 00:00:00 2001 +From: David Gnedt <david.gnedt@davizone.at> +Date: Sun, 30 Jan 2011 19:11:10 +0100 +Subject: [PATCH] wl1251: set rate index and preamble flag on received packets + +wl1251: set rate index and preamble flag on received packets + +Set the rate index rate_idx and preamble flag RX_FLAG_SHORTPRE on received +packets. + +Signed-off-by: David Gnedt <david.gnedt@davizone.at> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/rx.c | 46 +++++++++++++++++++++++++++++++++++++- + 1 files changed, 45 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/rx.c b/drivers/net/wireless/wl1251/rx.c +index efa5360..1b626b2 100644 +--- a/drivers/net/wireless/wl1251/rx.c ++++ b/drivers/net/wireless/wl1251/rx.c +@@ -95,8 +95,52 @@ static void wl1251_rx_status(struct wl1251 *wl, + if (unlikely(!(desc->flags & RX_DESC_VALID_FCS))) + status->flag |= RX_FLAG_FAILED_FCS_CRC; + ++ switch (desc->rate) { ++ /* skip 1 and 12 Mbps because they have same value 0x0a */ ++ case RATE_2MBPS: ++ status->rate_idx = 1; ++ break; ++ case RATE_5_5MBPS: ++ status->rate_idx = 2; ++ break; ++ case RATE_11MBPS: ++ status->rate_idx = 3; ++ break; ++ case RATE_6MBPS: ++ status->rate_idx = 4; ++ break; ++ case RATE_9MBPS: ++ status->rate_idx = 5; ++ break; ++ case RATE_18MBPS: ++ status->rate_idx = 7; ++ break; ++ case RATE_24MBPS: ++ status->rate_idx = 8; ++ break; ++ case RATE_36MBPS: ++ status->rate_idx = 9; ++ break; ++ case RATE_48MBPS: ++ status->rate_idx = 10; ++ break; ++ case RATE_54MBPS: ++ status->rate_idx = 11; ++ break; ++ } ++ ++ /* for 1 and 12 Mbps we have to check the modulation */ ++ if (desc->rate == RATE_1MBPS) { ++ if (!(desc->mod_pre & OFDM_RATE_BIT)) ++ /* CCK -> RATE_1MBPS */ ++ status->rate_idx = 0; ++ else ++ /* OFDM -> RATE_12MBPS */ ++ status->rate_idx = 6; ++ } + +- /* FIXME: set status->rate_idx */ ++ if (desc->mod_pre & SHORT_PREAMBLE_BIT) ++ status->flag |= RX_FLAG_SHORTPRE; + } + + static void wl1251_rx_body(struct wl1251 *wl, +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-use-wl12xx_platform_data-to-pass-data.patch ^ |
@@ -0,0 +1,177 @@ +From b3bee75ac48003b1b22f66b765ed50ff16ef01bc Mon Sep 17 00:00:00 2001 +From: Grazvydas Ignotas <notasas@gmail.com> +Date: Wed, 3 Nov 2010 22:13:49 +0200 +Subject: [PATCH] wl1251: use wl12xx_platform_data to pass data + +wl1251: use wl12xx_platform_data to pass data + +Make use the newly added method to pass platform data for wl1251 too. +This allows to eliminate some redundant code. + +Cc: Ohad Ben-Cohen <ohad@wizery.com> +Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Acked-by: Luciano Coelho <luciano.coelho@nokia.com> +Acked-by: Tony Lindgren <tony@atomide.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + arch/arm/mach-omap2/board-omap3pandora.c | 32 +++++++------------------- + drivers/net/wireless/wl1251/sdio.c | 35 +---------------------------- + drivers/net/wireless/wl12xx/Kconfig | 2 +- + 3 files changed, 12 insertions(+), 57 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c +index 89ed1be..8be2615 100644 +--- a/arch/arm/mach-omap2/board-omap3pandora.c ++++ b/arch/arm/mach-omap2/board-omap3pandora.c +@@ -642,31 +642,13 @@ static void __init omap3pandora_init_irq(void) + omap_gpio_init(); + } + +-static void pandora_wl1251_set_power(bool enable) +-{ +- /* +- * Keep power always on until wl1251_sdio driver learns to re-init +- * the chip after powering it down and back up. +- */ +-} +- +-static struct wl12xx_platform_data pandora_wl1251_pdata = { +- .set_power = pandora_wl1251_set_power, +- .use_eeprom = true, +-}; +- +-static struct platform_device pandora_wl1251_data = { +- .name = "wl1251_data", +- .id = -1, +- .dev = { +- .platform_data = &pandora_wl1251_pdata, +- }, +-}; +- +-static void pandora_wl1251_init(void) ++static void __init pandora_wl1251_init(void) + { ++ struct wl12xx_platform_data pandora_wl1251_pdata; + int ret; + ++ memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata)); ++ + ret = gpio_request(PANDORA_WIFI_IRQ_GPIO, "wl1251 irq"); + if (ret < 0) + goto fail; +@@ -679,6 +661,11 @@ static void pandora_wl1251_init(void) + if (pandora_wl1251_pdata.irq < 0) + goto fail_irq; + ++ pandora_wl1251_pdata.use_eeprom = true; ++ ret = wl12xx_set_platform_data(&pandora_wl1251_pdata); ++ if (ret < 0) ++ goto fail_irq; ++ + return; + + fail_irq: +@@ -691,7 +678,6 @@ static struct platform_device *omap3pandora_devices[] __initdata = { + &pandora_leds_gpio, + &pandora_keys_gpio, + &pandora_dss_device, +- &pandora_wl1251_data, + &pandora_vwlan_device, + }; + +diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c +index f3e185e..596d90e 100644 +--- a/drivers/net/wireless/wl1251/sdio.c ++++ b/drivers/net/wireless/wl1251/sdio.c +@@ -43,8 +43,6 @@ struct wl1251_sdio { + u32 elp_val; + }; + +-static struct wl12xx_platform_data *wl12xx_board_data; +- + static struct sdio_func *wl_to_func(struct wl1251 *wl) + { + struct wl1251_sdio *wl_sdio = wl->if_priv; +@@ -219,30 +217,6 @@ static struct wl1251_if_operations wl1251_sdio_ops = { + .power = wl1251_sdio_set_power, + }; + +-static int wl1251_platform_probe(struct platform_device *pdev) +-{ +- if (pdev->id != -1) { +- wl1251_error("can only handle single device"); +- return -ENODEV; +- } +- +- wl12xx_board_data = pdev->dev.platform_data; +- return 0; +-} +- +-/* +- * Dummy platform_driver for passing platform_data to this driver, +- * until we have a way to pass this through SDIO subsystem or +- * some other way. +- */ +-static struct platform_driver wl1251_platform_driver = { +- .driver = { +- .name = "wl1251_data", +- .owner = THIS_MODULE, +- }, +- .probe = wl1251_platform_probe, +-}; +- + static int wl1251_sdio_probe(struct sdio_func *func, + const struct sdio_device_id *id) + { +@@ -250,6 +224,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, + struct wl1251 *wl; + struct ieee80211_hw *hw; + struct wl1251_sdio *wl_sdio; ++ const struct wl12xx_platform_data *wl12xx_board_data; + + hw = wl1251_alloc_hw(); + if (IS_ERR(hw)) +@@ -276,6 +251,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, + wl->if_priv = wl_sdio; + wl->if_ops = &wl1251_sdio_ops; + ++ wl12xx_board_data = wl12xx_get_platform_data(); + if (wl12xx_board_data != NULL) { + wl->set_power = wl12xx_board_data->set_power; + wl->irq = wl12xx_board_data->irq; +@@ -378,12 +354,6 @@ static int __init wl1251_sdio_init(void) + { + int err; + +- err = platform_driver_register(&wl1251_platform_driver); +- if (err) { +- wl1251_error("failed to register platform driver: %d", err); +- return err; +- } +- + err = sdio_register_driver(&wl1251_sdio_driver); + if (err) + wl1251_error("failed to register sdio driver: %d", err); +@@ -393,7 +363,6 @@ static int __init wl1251_sdio_init(void) + static void __exit wl1251_sdio_exit(void) + { + sdio_unregister_driver(&wl1251_sdio_driver); +- platform_driver_unregister(&wl1251_platform_driver); + wl1251_notice("unloaded"); + } + +diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig +index b447559..1f4d73f 100644 +--- a/drivers/net/wireless/wl12xx/Kconfig ++++ b/drivers/net/wireless/wl12xx/Kconfig +@@ -42,5 +42,5 @@ config WL1271_SDIO + + config WL12XX_PLATFORM_DATA + bool +- depends on WL1271_SDIO != n ++ depends on WL1271_SDIO != n || WL1251_SDIO != n + default y +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-wl1251-wl12xx_get_platform_data-returns-an-ERR_PTR.patch ^ |
@@ -0,0 +1,33 @@ +From db72799c57c125ba37496b10ed520b68c50851b4 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter <error27@gmail.com> +Date: Sat, 18 Dec 2010 08:52:10 +0300 +Subject: [PATCH] wl1251: wl12xx_get_platform_data() returns an ERR_PTR + +wl1251: wl12xx_get_platform_data() returns an ERR_PTR + +wl12xx_get_platform_data() returns an ERR_PTR on failure and it never +returns a NULL. + +Signed-off-by: Dan Carpenter <error27@gmail.com> +Acked-by: Kalle Valo <kvalo@adurom.com> +Signed-off-by: John W. Linville <linville@tuxdriver.com> +--- + drivers/net/wireless/wl1251/sdio.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/sdio.c b/drivers/net/wireless/wl1251/sdio.c +index 596d90e..d550b5e 100644 +--- a/drivers/net/wireless/wl1251/sdio.c ++++ b/drivers/net/wireless/wl1251/sdio.c +@@ -252,7 +252,7 @@ static int wl1251_sdio_probe(struct sdio_func *func, + wl->if_ops = &wl1251_sdio_ops; + + wl12xx_board_data = wl12xx_get_platform_data(); +- if (wl12xx_board_data != NULL) { ++ if (!IS_ERR(wl12xx_board_data)) { + wl->set_power = wl12xx_board_data->set_power; + wl->irq = wl12xx_board_data->irq; + wl->use_eeprom = wl12xx_board_data->use_eeprom; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-zram-Return-zero-d-pages-on-new-reads.patch ^ |
@@ -0,0 +1,45 @@ +From 624d6ab26dff3332433c199069fa6d32665667ed Mon Sep 17 00:00:00 2001 +From: Robert Jennings <rcj@linux.vnet.ibm.com> +Date: Fri, 28 Jan 2011 09:00:42 -0600 +Subject: [PATCH] zram: Return zero'd pages on new reads + +Currently zram will do nothing to the page in the bvec when that page +has not been previously written. This allows random data to leak to +user space. That can be seen by doing the following: + + ## Load the module and create a 256Mb zram device called /dev/zram0 + # modprobe zram + # echo $((256*1024*1024)) > /sys/class/block/zram0/disksize + + ## Initialize the device by writing zero to the first block + # dd if=/dev/zero of=/dev/zram0 bs=512 count=1 + + ## Read ~256Mb of memory into a file and hope for something interesting + # dd if=/dev/zram0 of=file + +This patch will treat an unwritten page as a zero-filled page. If a +page is read before a write has occurred the data returned is all 0's. + +Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> +Reviewed-by: Pekka Enberg <penberg@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/zram_drv.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c +index b001760..cf5fa72 100644 +--- a/drivers/staging/zram/zram_drv.c ++++ b/drivers/staging/zram/zram_drv.c +@@ -234,7 +234,7 @@ static void zram_read(struct zram *zram, struct bio *bio) + if (unlikely(!zram->table[index].page)) { + pr_debug("Read before write: sector=%lu, size=%u", + (ulong)(bio->bi_sector), bio->bi_size); +- /* Do nothing */ ++ handle_zero_page(page); + index++; + continue; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.39-zram-xvmalloc-free-bit-block-insertion-optimization.patch ^ |
@@ -0,0 +1,41 @@ +From 1b0575fbea80d3bfb13e2bc3d029bbac75cfe4fa Mon Sep 17 00:00:00 2001 +From: Robert Jennings <rcj@linux.vnet.ibm.com> +Date: Fri, 28 Jan 2011 08:58:54 -0600 +Subject: [PATCH] zram/xvmalloc: free bit block insertion optimization + +This change is in a conditional block which is entered only when there is +an existing data block on the freelist where the insert has taken place. + +The new block is pushed onto the freelist stack and this conditional block +is updating links in the prior stack head to point to the new stack head. +After this conditional block the first-/second-level indices are updated +to indicate that there is a free block at this location. + +This patch adds an immediate return from the conditional block to avoid +setting bits again to indicate a free block on this freelist. The bits +would already be set because there was an existing free block on this +freelist. + +Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> +Reviewed-by: Pekka Enberg <penberg@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> +--- + drivers/staging/zram/xvmalloc.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c +index b644067..149138a 100644 +--- a/drivers/staging/zram/xvmalloc.c ++++ b/drivers/staging/zram/xvmalloc.c +@@ -200,6 +200,8 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset, + nextblock->link.prev_page = page; + nextblock->link.prev_offset = offset; + put_ptr_atomic(nextblock, KM_USER1); ++ /* If there was a next page then the free bits are set. */ ++ return; + } + + __set_bit(slindex % BITS_PER_LONG, &pool->slbitmap[flindex]); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-ARM-io-make-iounmap-a-simple-macro.patch ^ |
@@ -0,0 +1,198 @@ +From 3d321dc1df454516aff2590f0b7070e6971bced3 Mon Sep 17 00:00:00 2001 +From: Russell King <rmk+kernel@arm.linux.org.uk> +Date: Wed, 8 Dec 2010 13:49:04 +0000 +Subject: [PATCH] ARM: io: make iounmap() a simple macro + +ARM: io: make iounmap() a simple macro + +Defining iounmap() with arguments prevents it from being used as a +function pointer, causing platforms to work around this. Instead, +define it to be a simple macro. + +Do the same for __arch_io(re|un)map too. + +Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> +--- + arch/arm/include/asm/io.h | 4 ++-- + arch/arm/mach-davinci/include/mach/io.h | 4 ++-- + arch/arm/mach-iop13xx/include/mach/io.h | 4 ++-- + arch/arm/mach-iop32x/include/mach/io.h | 4 ++-- + arch/arm/mach-iop33x/include/mach/io.h | 4 ++-- + arch/arm/mach-ixp23xx/include/mach/io.h | 4 ++-- + arch/arm/mach-ixp4xx/include/mach/io.h | 4 ++-- + arch/arm/mach-kirkwood/include/mach/io.h | 4 ++-- + arch/arm/mach-orion5x/include/mach/io.h | 4 ++-- + arch/arm/mach-tegra/include/mach/io.h | 4 ++-- + arch/arm/plat-omap/include/plat/io.h | 4 ++-- + 11 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h +index 815efa2..91be1f8 100644 +--- a/arch/arm/include/asm/io.h ++++ b/arch/arm/include/asm/io.h +@@ -245,13 +245,13 @@ extern void _memset_io(volatile void __iomem *, int, size_t); + #define ioremap_nocache(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE) + #define ioremap_cached(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_CACHED) + #define ioremap_wc(cookie,size) __arm_ioremap(cookie, size, MT_DEVICE_WC) +-#define iounmap(cookie) __iounmap(cookie) ++#define iounmap __iounmap + #else + #define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) + #define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) + #define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) + #define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC) +-#define iounmap(cookie) __arch_iounmap(cookie) ++#define iounmap __arch_iounmap + #endif + + /* +diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h +index 62b0a90..d1b9549 100644 +--- a/arch/arm/mach-davinci/include/mach/io.h ++++ b/arch/arm/mach-davinci/include/mach/io.h +@@ -22,8 +22,8 @@ + #define __mem_isa(a) (a) + + #ifndef __ASSEMBLER__ +-#define __arch_ioremap(p, s, t) davinci_ioremap(p, s, t) +-#define __arch_iounmap(v) davinci_iounmap(v) ++#define __arch_ioremap davinci_ioremap ++#define __arch_iounmap davinci_iounmap + + void __iomem *davinci_ioremap(unsigned long phys, size_t size, + unsigned int type); +diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h +index a6e0f9e..dffb234 100644 +--- a/arch/arm/mach-iop13xx/include/mach/io.h ++++ b/arch/arm/mach-iop13xx/include/mach/io.h +@@ -35,7 +35,7 @@ extern u32 iop13xx_atux_mem_base; + extern size_t iop13xx_atue_mem_size; + extern size_t iop13xx_atux_mem_size; + +-#define __arch_ioremap(a, s, f) __iop13xx_ioremap(a, s, f) +-#define __arch_iounmap(a) __iop13xx_iounmap(a) ++#define __arch_ioremap __iop13xx_ioremap ++#define __arch_iounmap __iop13xx_iounmap + + #endif +diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h +index 339e585..059c783 100644 +--- a/arch/arm/mach-iop32x/include/mach/io.h ++++ b/arch/arm/mach-iop32x/include/mach/io.h +@@ -21,7 +21,7 @@ extern void __iop3xx_iounmap(void __iomem *addr); + #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) + #define __mem_pci(a) (a) + +-#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f) +-#define __arch_iounmap(a) __iop3xx_iounmap(a) ++#define __arch_ioremap __iop3xx_ioremap ++#define __arch_iounmap __iop3xx_iounmap + + #endif +diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h +index e99a7ed..39e893e 100644 +--- a/arch/arm/mach-iop33x/include/mach/io.h ++++ b/arch/arm/mach-iop33x/include/mach/io.h +@@ -21,7 +21,7 @@ extern void __iop3xx_iounmap(void __iomem *addr); + #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) + #define __mem_pci(a) (a) + +-#define __arch_ioremap(a, s, f) __iop3xx_ioremap(a, s, f) +-#define __arch_iounmap(a) __iop3xx_iounmap(a) ++#define __arch_ioremap __iop3xx_ioremap ++#define __arch_iounmap __iop3xx_iounmap + + #endif +diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h +index fd9ef8e..a1749d0 100644 +--- a/arch/arm/mach-ixp23xx/include/mach/io.h ++++ b/arch/arm/mach-ixp23xx/include/mach/io.h +@@ -45,8 +45,8 @@ ixp23xx_iounmap(void __iomem *addr) + __iounmap(addr); + } + +-#define __arch_ioremap(a,s,f) ixp23xx_ioremap(a,s,f) +-#define __arch_iounmap(a) ixp23xx_iounmap(a) ++#define __arch_ioremap ixp23xx_ioremap ++#define __arch_iounmap ixp23xx_iounmap + + + #endif +diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h +index de274a1..57b5410 100644 +--- a/arch/arm/mach-ixp4xx/include/mach/io.h ++++ b/arch/arm/mach-ixp4xx/include/mach/io.h +@@ -74,8 +74,8 @@ static inline void __indirect_iounmap(void __iomem *addr) + __iounmap(addr); + } + +-#define __arch_ioremap(a, s, f) __indirect_ioremap(a, s, f) +-#define __arch_iounmap(a) __indirect_iounmap(a) ++#define __arch_ioremap __indirect_ioremap ++#define __arch_iounmap __indirect_iounmap + + #define writeb(v, p) __indirect_writeb(v, p) + #define writew(v, p) __indirect_writew(v, p) +diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h +index 44e8be0..1aaddc3 100644 +--- a/arch/arm/mach-kirkwood/include/mach/io.h ++++ b/arch/arm/mach-kirkwood/include/mach/io.h +@@ -42,8 +42,8 @@ __arch_iounmap(void __iomem *addr) + __iounmap(addr); + } + +-#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) +-#define __arch_iounmap(a) __arch_iounmap(a) ++#define __arch_ioremap __arch_ioremap ++#define __arch_iounmap __arch_iounmap + #define __io(a) __io(a) + #define __mem_pci(a) (a) + +diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h +index c47b033..c519610 100644 +--- a/arch/arm/mach-orion5x/include/mach/io.h ++++ b/arch/arm/mach-orion5x/include/mach/io.h +@@ -38,8 +38,8 @@ __arch_iounmap(void __iomem *addr) + __iounmap(addr); + } + +-#define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) +-#define __arch_iounmap(a) __arch_iounmap(a) ++#define __arch_ioremap __arch_ioremap ++#define __arch_iounmap __arch_iounmap + #define __io(a) __typesafe_io(a) + #define __mem_pci(a) (a) + +diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h +index f0981b1..4cea223 100644 +--- a/arch/arm/mach-tegra/include/mach/io.h ++++ b/arch/arm/mach-tegra/include/mach/io.h +@@ -65,8 +65,8 @@ + + #ifndef __ASSEMBLER__ + +-#define __arch_ioremap(p, s, t) tegra_ioremap(p, s, t) +-#define __arch_iounmap(v) tegra_iounmap(v) ++#define __arch_ioremap tegra_ioremap ++#define __arch_iounmap tegra_iounmap + + void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type); + void tegra_iounmap(volatile void __iomem *addr); +diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h +index 128b549..204865f 100644 +--- a/arch/arm/plat-omap/include/plat/io.h ++++ b/arch/arm/plat-omap/include/plat/io.h +@@ -294,8 +294,8 @@ static inline void omap44xx_map_common_io(void) + extern void omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, + struct omap_sdrc_params *sdrc_cs1); + +-#define __arch_ioremap(p,s,t) omap_ioremap(p,s,t) +-#define __arch_iounmap(v) omap_iounmap(v) ++#define __arch_ioremap omap_ioremap ++#define __arch_iounmap omap_iounmap + + void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type); + void omap_iounmap(volatile void __iomem *addr); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-OMAP-iommu-create-new-api-to-set-valid-da-range.patch ^ |
@@ -0,0 +1,177 @@ +From 15cd79214d24d677635999bef02e053c69b07d1d Mon Sep 17 00:00:00 2001 +From: Guzman Lugo, Fernando <x0095840@ti.com> +Date: Wed, 15 Dec 2010 00:54:03 +0000 +Subject: [PATCH] OMAP: iommu: create new api to set valid da range + +OMAP: iommu: create new api to set valid da range + +Some IOMMUs cannot use the whole 0x0 - 0xFFFFFFFF range. +With this new API the valid range can be set. + +Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/mach-omap2/omap-iommu.c | 8 ++++++++ + arch/arm/plat-omap/include/plat/iommu.h | 5 +++++ + arch/arm/plat-omap/iommu.c | 24 ++++++++++++++++++++++++ + arch/arm/plat-omap/iovmm.c | 15 ++++++++------- + 4 files changed, 45 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c +index f5a1aad..6be548c 100644 +--- a/arch/arm/mach-omap2/omap-iommu.c ++++ b/arch/arm/mach-omap2/omap-iommu.c +@@ -33,6 +33,8 @@ static struct iommu_device omap3_devices[] = { + .name = "isp", + .nr_tlb_entries = 8, + .clk_name = "cam_ick", ++ .da_start = 0x0, ++ .da_end = 0xFFFFF000, + }, + }, + #if defined(CONFIG_MPU_BRIDGE_IOMMU) +@@ -43,6 +45,8 @@ static struct iommu_device omap3_devices[] = { + .name = "iva2", + .nr_tlb_entries = 32, + .clk_name = "iva2_ck", ++ .da_start = 0x11000000, ++ .da_end = 0xFFFFF000, + }, + }, + #endif +@@ -64,6 +68,8 @@ static struct iommu_device omap4_devices[] = { + .name = "ducati", + .nr_tlb_entries = 32, + .clk_name = "ducati_ick", ++ .da_start = 0x0, ++ .da_end = 0xFFFFF000, + }, + }, + #if defined(CONFIG_MPU_TESLA_IOMMU) +@@ -74,6 +80,8 @@ static struct iommu_device omap4_devices[] = { + .name = "tesla", + .nr_tlb_entries = 32, + .clk_name = "tesla_ick", ++ .da_start = 0x0, ++ .da_end = 0xFFFFF000, + }, + }, + #endif +diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h +index 33c7d41..69230d6 100644 +--- a/arch/arm/plat-omap/include/plat/iommu.h ++++ b/arch/arm/plat-omap/include/plat/iommu.h +@@ -50,6 +50,8 @@ struct iommu { + int (*isr)(struct iommu *obj); + + void *ctx; /* iommu context: registres saved area */ ++ u32 da_start; ++ u32 da_end; + }; + + struct cr_regs { +@@ -103,6 +105,8 @@ struct iommu_platform_data { + const char *name; + const char *clk_name; + const int nr_tlb_entries; ++ u32 da_start; ++ u32 da_end; + }; + + #if defined(CONFIG_ARCH_OMAP1) +@@ -152,6 +156,7 @@ extern void flush_iotlb_all(struct iommu *obj); + extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); + extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova); + ++extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); + extern struct iommu *iommu_get(const char *name); + extern void iommu_put(struct iommu *obj); + +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index 6cd151b..b1107c0 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -830,6 +830,28 @@ static int device_match_by_alias(struct device *dev, void *data) + } + + /** ++ * iommu_set_da_range - Set a valid device address range ++ * @obj: target iommu ++ * @start Start of valid range ++ * @end End of valid range ++ **/ ++int iommu_set_da_range(struct iommu *obj, u32 start, u32 end) ++{ ++ ++ if (!obj) ++ return -EFAULT; ++ ++ if (end < start || !PAGE_ALIGN(start | end)) ++ return -EINVAL; ++ ++ obj->da_start = start; ++ obj->da_end = end; ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(iommu_set_da_range); ++ ++/** + * iommu_get - Get iommu handler + * @name: target iommu name + **/ +@@ -922,6 +944,8 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev) + obj->name = pdata->name; + obj->dev = &pdev->dev; + obj->ctx = (void *)obj + sizeof(*obj); ++ obj->da_start = pdata->da_start; ++ obj->da_end = pdata->da_end; + + mutex_init(&obj->iommu_lock); + mutex_init(&obj->mmap_lock); +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index fa6e643..6dc1296 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -280,13 +280,14 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + alignement = PAGE_SIZE; + + if (flags & IOVMF_DA_ANON) { +- /* +- * Reserve the first page for NULL +- */ +- start = PAGE_SIZE; ++ start = obj->da_start; ++ + if (flags & IOVMF_LINEAR) + alignement = iopgsz_max(bytes); + start = roundup(start, alignement); ++ } else if (start < obj->da_start || start > obj->da_end || ++ obj->da_end - start < bytes) { ++ return ERR_PTR(-EINVAL); + } + + tmp = NULL; +@@ -299,16 +300,16 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + if (prev_end > start) + break; + +- if (start + bytes <= tmp->da_start) ++ if (tmp->da_start > start && (tmp->da_start - start) >= bytes) + goto found; + +- if (flags & IOVMF_DA_ANON) ++ if (tmp->da_end >= start && flags & IOVMF_DA_ANON) + start = roundup(tmp->da_end + 1, alignement); + + prev_end = tmp->da_end; + } + +- if ((start >= prev_end) && (ULONG_MAX - start + 1 >= bytes)) ++ if ((start >= prev_end) && (obj->da_end - start >= bytes)) + goto found; + + dev_dbg(obj->dev, "%s: no space to fit %08x(%x) flags: %08x\n", +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-OMAP-iovmm-add-superpages-support-to-fixed-da-addres.patch ^ |
@@ -0,0 +1,161 @@ +From b316487b7e47af778581164683356f6408db9ad8 Mon Sep 17 00:00:00 2001 +From: Guzman Lugo, Fernando <x0095840@ti.com> +Date: Wed, 15 Dec 2010 00:54:01 +0000 +Subject: [PATCH] OMAP: iovmm: add superpages support to fixed da address + +OMAP: iovmm: add superpages support to fixed da address + +This patch adds superpages support to fixed ad address +inside iommu_kmap function. + +Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/plat-omap/iovmm.c | 62 +++++++++++++++++++++++++------------------ + 1 files changed, 36 insertions(+), 26 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index 34f0012..93a34d9 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -87,35 +87,43 @@ static size_t sgtable_len(const struct sg_table *sgt) + } + #define sgtable_ok(x) (!!sgtable_len(x)) + ++static unsigned max_alignment(u32 addr) ++{ ++ int i; ++ unsigned pagesize[] = { SZ_16M, SZ_1M, SZ_64K, SZ_4K, }; ++ for (i = 0; i < ARRAY_SIZE(pagesize) && addr & (pagesize[i] - 1); i++) ++ ; ++ return (i < ARRAY_SIZE(pagesize)) ? pagesize[i] : 0; ++} ++ + /* + * calculate the optimal number sg elements from total bytes based on + * iommu superpages + */ +-static unsigned int sgtable_nents(size_t bytes) ++static unsigned sgtable_nents(size_t bytes, u32 da, u32 pa) + { +- int i; +- unsigned int nr_entries; +- const unsigned long pagesize[] = { SZ_16M, SZ_1M, SZ_64K, SZ_4K, }; ++ unsigned nr_entries = 0, ent_sz; + + if (!IS_ALIGNED(bytes, PAGE_SIZE)) { + pr_err("%s: wrong size %08x\n", __func__, bytes); + return 0; + } + +- nr_entries = 0; +- for (i = 0; i < ARRAY_SIZE(pagesize); i++) { +- if (bytes >= pagesize[i]) { +- nr_entries += (bytes / pagesize[i]); +- bytes %= pagesize[i]; +- } ++ while (bytes) { ++ ent_sz = max_alignment(da | pa); ++ ent_sz = min_t(unsigned, ent_sz, iopgsz_max(bytes)); ++ nr_entries++; ++ da += ent_sz; ++ pa += ent_sz; ++ bytes -= ent_sz; + } +- BUG_ON(bytes); + + return nr_entries; + } + + /* allocate and initialize sg_table header(a kind of 'superblock') */ +-static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags) ++static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags, ++ u32 da, u32 pa) + { + unsigned int nr_entries; + int err; +@@ -127,9 +135,8 @@ static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags) + if (!IS_ALIGNED(bytes, PAGE_SIZE)) + return ERR_PTR(-EINVAL); + +- /* FIXME: IOVMF_DA_FIXED should support 'superpages' */ +- if ((flags & IOVMF_LINEAR) && (flags & IOVMF_DA_ANON)) { +- nr_entries = sgtable_nents(bytes); ++ if (flags & IOVMF_LINEAR) { ++ nr_entries = sgtable_nents(bytes, da, pa); + if (!nr_entries) + return ERR_PTR(-EINVAL); + } else +@@ -409,7 +416,8 @@ static inline void sgtable_drain_vmalloc(struct sg_table *sgt) + BUG_ON(!sgt); + } + +-static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, size_t len) ++static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, u32 da, ++ size_t len) + { + unsigned int i; + struct scatterlist *sg; +@@ -418,9 +426,10 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, size_t len) + va = phys_to_virt(pa); + + for_each_sg(sgt->sgl, sg, sgt->nents, i) { +- size_t bytes; ++ unsigned bytes; + +- bytes = iopgsz_max(len); ++ bytes = max_alignment(da | pa); ++ bytes = min_t(unsigned, bytes, iopgsz_max(len)); + + BUG_ON(!iopgsz_ok(bytes)); + +@@ -429,6 +438,7 @@ static void sgtable_fill_kmalloc(struct sg_table *sgt, u32 pa, size_t len) + * 'pa' is cotinuous(linear). + */ + pa += bytes; ++ da += bytes; + len -= bytes; + } + BUG_ON(len); +@@ -695,18 +705,18 @@ u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) + if (!va) + return -ENOMEM; + +- sgt = sgtable_alloc(bytes, flags); ++ flags &= IOVMF_HW_MASK; ++ flags |= IOVMF_DISCONT; ++ flags |= IOVMF_ALLOC; ++ flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); ++ ++ sgt = sgtable_alloc(bytes, flags, da, 0); + if (IS_ERR(sgt)) { + da = PTR_ERR(sgt); + goto err_sgt_alloc; + } + sgtable_fill_vmalloc(sgt, va); + +- flags &= IOVMF_HW_MASK; +- flags |= IOVMF_DISCONT; +- flags |= IOVMF_ALLOC; +- flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); +- + da = __iommu_vmap(obj, da, sgt, va, bytes, flags); + if (IS_ERR_VALUE(da)) + goto err_iommu_vmap; +@@ -746,11 +756,11 @@ static u32 __iommu_kmap(struct iommu *obj, u32 da, u32 pa, void *va, + { + struct sg_table *sgt; + +- sgt = sgtable_alloc(bytes, flags); ++ sgt = sgtable_alloc(bytes, flags, da, pa); + if (IS_ERR(sgt)) + return PTR_ERR(sgt); + +- sgtable_fill_kmalloc(sgt, pa, bytes); ++ sgtable_fill_kmalloc(sgt, pa, da, bytes); + + da = map_iommu_region(obj, da, sgt, va, bytes, flags); + if (IS_ERR_VALUE(da)) { +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-OMAP-iovmm-no-gap-checking-for-fixed-address.patch ^ |
@@ -0,0 +1,47 @@ +From 26f6c9b4866c7fbb1c63a38c1fc8ae33b200f232 Mon Sep 17 00:00:00 2001 +From: Guzman Lugo, Fernando <x0095840@ti.com> +Date: Wed, 15 Dec 2010 00:54:00 +0000 +Subject: [PATCH] OMAP: iovmm: no gap checking for fixed address + +OMAP: iovmm: no gap checking for fixed address + +If some fixed da address is wanted to be mapped and the page +is freed but it is used as gap, the mapping will fail. +This patch is fixing that and olny keeps the gap for +not fixed address. + +Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/plat-omap/iovmm.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index 8ce0de2..34f0012 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -289,10 +289,10 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + prev_end = 0; + list_for_each_entry(tmp, &obj->mmap, list) { + +- if (prev_end >= start) ++ if (prev_end > start) + break; + +- if (start + bytes < tmp->da_start) ++ if (start + bytes <= tmp->da_start) + goto found; + + if (flags & IOVMF_DA_ANON) +@@ -301,7 +301,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + prev_end = tmp->da_end; + } + +- if ((start > prev_end) && (ULONG_MAX - start >= bytes)) ++ if ((start >= prev_end) && (ULONG_MAX - start + 1 >= bytes)) + goto found; + + dev_dbg(obj->dev, "%s: no space to fit %08x(%x) flags: %08x\n", +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-OMAP-iovmm-replace-__iounmap-with-iounmap.patch ^ |
@@ -0,0 +1,32 @@ +From 0957c764dc391666cb2e2771e329da0b0e177b18 Mon Sep 17 00:00:00 2001 +From: Guzman Lugo, Fernando <x0095840@ti.com> +Date: Wed, 15 Dec 2010 00:54:02 +0000 +Subject: [PATCH] OMAP: iovmm: replace __iounmap with iounmap + +OMAP: iovmm: replace __iounmap with iounmap + +__iounmap function is wrong for OMAP architecture, +instead use iounmap which will call to the correct function. + +Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +--- + arch/arm/plat-omap/iovmm.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index 93a34d9..fa6e643 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -821,7 +821,7 @@ void iommu_kunmap(struct iommu *obj, u32 da) + struct sg_table *sgt; + typedef void (*func_t)(const void *); + +- sgt = unmap_vm_area(obj, da, (func_t)__iounmap, ++ sgt = unmap_vm_area(obj, da, (func_t)iounmap, + IOVMF_LINEAR | IOVMF_MMIO); + if (!sgt) + dev_dbg(obj->dev, "%s: No sgt\n", __func__); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-OMAP2-IOMMU-don-t-print-fault-warning-on-specific-la.patch ^ |
@@ -0,0 +1,56 @@ +From 2589881e0da3fb45dafa946faa3b6313ee02a8bf Mon Sep 17 00:00:00 2001 +From: David Cohen <dacohen@gmail.com> +Date: Wed, 16 Feb 2011 19:35:50 +0000 +Subject: [PATCH] OMAP2+: IOMMU: don't print fault warning on specific layer + +OMAP2+: IOMMU: don't print fault warning on specific layer + +IOMMU upper layer and user are responsible to handle a fault and to +define whether it will end up as an error or not. OMAP2+ specific +layer should not print anything in such case. + +Signed-off-by: David Cohen <dacohen@gmail.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/mach-omap2/iommu2.c | 16 ---------------- + 1 files changed, 0 insertions(+), 16 deletions(-) + +diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c +index 14ee686..49a1e5e 100644 +--- a/arch/arm/mach-omap2/iommu2.c ++++ b/arch/arm/mach-omap2/iommu2.c +@@ -145,15 +145,7 @@ static void omap2_iommu_set_twl(struct iommu *obj, bool on) + + static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) + { +- int i; + u32 stat, da; +- const char *err_msg[] = { +- "tlb miss", +- "translation fault", +- "emulation miss", +- "table walk fault", +- "multi hit fault", +- }; + + stat = iommu_read_reg(obj, MMU_IRQSTATUS); + stat &= MMU_IRQ_MASK; +@@ -163,14 +155,6 @@ static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) + da = iommu_read_reg(obj, MMU_FAULT_AD); + *ra = da; + +- dev_err(obj->dev, "%s:\tda:%08x ", __func__, da); +- +- for (i = 0; i < ARRAY_SIZE(err_msg); i++) { +- if (stat & (1 << i)) +- printk("%s ", err_msg[i]); +- } +- printk("\n"); +- + iommu_write_reg(obj, stat, MMU_IRQSTATUS); + + return stat; +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-arm-plat-omap-iommu-fix-request_mem_region-error-pat.patch ^ |
@@ -0,0 +1,60 @@ +From 6f806c783b9f2db0d03595d1cef83393889c3d4d Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen <Aaro.Koskinen@nokia.com> +Date: Mon, 14 Mar 2011 12:28:32 +0000 +Subject: [PATCH] arm: plat-omap: iommu: fix request_mem_region() error path + +arm: plat-omap: iommu: fix request_mem_region() error path + +request_mem_region() error exit will leak ioremapped memory. Fix this +by moving the ioremap() after request_mem_region(), which is the proper +order to do this anyway. + +Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/iommu.c | 14 ++++++++------ + 1 files changed, 8 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index e3eb038..8a51fd5 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -982,11 +982,6 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev) + err = -ENODEV; + goto err_mem; + } +- obj->regbase = ioremap(res->start, resource_size(res)); +- if (!obj->regbase) { +- err = -ENOMEM; +- goto err_mem; +- } + + res = request_mem_region(res->start, resource_size(res), + dev_name(&pdev->dev)); +@@ -995,6 +990,12 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev) + goto err_mem; + } + ++ obj->regbase = ioremap(res->start, resource_size(res)); ++ if (!obj->regbase) { ++ err = -ENOMEM; ++ goto err_ioremap; ++ } ++ + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + err = -ENODEV; +@@ -1023,8 +1024,9 @@ static int __devinit omap_iommu_probe(struct platform_device *pdev) + err_pgd: + free_irq(irq, obj); + err_irq: +- release_mem_region(res->start, resource_size(res)); + iounmap(obj->regbase); ++err_ioremap: ++ release_mem_region(res->start, resource_size(res)); + err_mem: + clk_put(obj->clk); + err_clk: +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-IOMMU-add-missing-function-declaration.patch ^ |
@@ -0,0 +1,34 @@ +From 3b39d67e8d1b012e716217cca45f168120b7da9f Mon Sep 17 00:00:00 2001 +From: David Cohen <dacohen@gmail.com> +Date: Tue, 15 Feb 2011 11:31:13 +0000 +Subject: [PATCH] omap: IOMMU: add missing function declaration + +omap: IOMMU: add missing function declaration + +Declaration of exported function 'iopgtable_lookup_entry' is missing from +header file. Currently we have a sparse warning as it's not being used +externally. Adding its declaration to avoid such warning and allow its usage +in future. + +Signed-off-by: David Cohen <dacohen@gmail.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/include/plat/iommu.h | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h +index 69230d6..19cbb5e 100644 +--- a/arch/arm/plat-omap/include/plat/iommu.h ++++ b/arch/arm/plat-omap/include/plat/iommu.h +@@ -154,6 +154,8 @@ extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end); + extern void flush_iotlb_all(struct iommu *obj); + + extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); ++extern void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd, ++ u32 **ppte); + extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova); + + extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-IOMMU-add-support-to-callback-during-fault-hand.patch ^ |
@@ -0,0 +1,198 @@ +From e609e01360e173c857a4b39a2ed5ecfd0181b1fa Mon Sep 17 00:00:00 2001 +From: David Cohen <dacohen@gmail.com> +Date: Wed, 16 Feb 2011 19:35:51 +0000 +Subject: [PATCH] omap: IOMMU: add support to callback during fault handling + +omap: IOMMU: add support to callback during fault handling + +Add support to register an isr for IOMMU fault situations and adapt it +to allow such (*isr)() to be used as fault callback. Drivers using IOMMU +module might want to be informed when errors happen in order to debug it +or react. + +Signed-off-by: David Cohen <dacohen@gmail.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/mach-omap2/iommu2.c | 17 +++++++++- + arch/arm/plat-omap/include/plat/iommu.h | 14 ++++++++- + arch/arm/plat-omap/iommu.c | 52 ++++++++++++++++++++++--------- + 3 files changed, 65 insertions(+), 18 deletions(-) + +diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c +index 49a1e5e..adb083e 100644 +--- a/arch/arm/mach-omap2/iommu2.c ++++ b/arch/arm/mach-omap2/iommu2.c +@@ -146,18 +146,31 @@ static void omap2_iommu_set_twl(struct iommu *obj, bool on) + static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) + { + u32 stat, da; ++ u32 errs = 0; + + stat = iommu_read_reg(obj, MMU_IRQSTATUS); + stat &= MMU_IRQ_MASK; +- if (!stat) ++ if (!stat) { ++ *ra = 0; + return 0; ++ } + + da = iommu_read_reg(obj, MMU_FAULT_AD); + *ra = da; + ++ if (stat & MMU_IRQ_TLBMISS) ++ errs |= OMAP_IOMMU_ERR_TLB_MISS; ++ if (stat & MMU_IRQ_TRANSLATIONFAULT) ++ errs |= OMAP_IOMMU_ERR_TRANS_FAULT; ++ if (stat & MMU_IRQ_EMUMISS) ++ errs |= OMAP_IOMMU_ERR_EMU_MISS; ++ if (stat & MMU_IRQ_TABLEWALKFAULT) ++ errs |= OMAP_IOMMU_ERR_TBLWALK_FAULT; ++ if (stat & MMU_IRQ_MULTIHITFAULT) ++ errs |= OMAP_IOMMU_ERR_MULTIHIT_FAULT; + iommu_write_reg(obj, stat, MMU_IRQSTATUS); + +- return stat; ++ return errs; + } + + static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) +diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h +index 19cbb5e..174f1b9 100644 +--- a/arch/arm/plat-omap/include/plat/iommu.h ++++ b/arch/arm/plat-omap/include/plat/iommu.h +@@ -31,6 +31,7 @@ struct iommu { + struct clk *clk; + void __iomem *regbase; + struct device *dev; ++ void *isr_priv; + + unsigned int refcount; + struct mutex iommu_lock; /* global for this whole object */ +@@ -47,7 +48,7 @@ struct iommu { + struct list_head mmap; + struct mutex mmap_lock; /* protect mmap */ + +- int (*isr)(struct iommu *obj); ++ int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, void *priv); + + void *ctx; /* iommu context: registres saved area */ + u32 da_start; +@@ -109,6 +110,13 @@ struct iommu_platform_data { + u32 da_end; + }; + ++/* IOMMU errors */ ++#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) ++#define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1) ++#define OMAP_IOMMU_ERR_EMU_MISS (1 << 2) ++#define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3) ++#define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4) ++ + #if defined(CONFIG_ARCH_OMAP1) + #error "iommu for this processor not implemented yet" + #else +@@ -161,6 +169,10 @@ extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova); + extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); + extern struct iommu *iommu_get(const char *name); + extern void iommu_put(struct iommu *obj); ++extern int iommu_set_isr(const char *name, ++ int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, ++ void *priv), ++ void *isr_priv); + + extern void iommu_save_ctx(struct iommu *obj); + extern void iommu_restore_ctx(struct iommu *obj); +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index 4b3218e..e3eb038 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -783,25 +783,19 @@ static void iopgtable_clear_entry_all(struct iommu *obj) + */ + static irqreturn_t iommu_fault_handler(int irq, void *data) + { +- u32 stat, da; ++ u32 da, errs; + u32 *iopgd, *iopte; +- int err = -EIO; + struct iommu *obj = data; + + if (!obj->refcount) + return IRQ_NONE; + +- /* Dynamic loading TLB or PTE */ +- if (obj->isr) +- err = obj->isr(obj); +- +- if (!err) +- return IRQ_HANDLED; +- + clk_enable(obj->clk); +- stat = iommu_report_fault(obj, &da); ++ errs = iommu_report_fault(obj, &da); + clk_disable(obj->clk); +- if (!stat) ++ ++ /* Fault callback or TLB/PTE Dynamic loading */ ++ if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv)) + return IRQ_HANDLED; + + iommu_disable(obj); +@@ -809,15 +803,16 @@ static irqreturn_t iommu_fault_handler(int irq, void *data) + iopgd = iopgd_offset(obj, da); + + if (!iopgd_is_table(*iopgd)) { +- dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x\n", obj->name, +- da, iopgd, *iopgd); ++ dev_err(obj->dev, "%s: errs:0x%08x da:0x%08x pgd:0x%p " ++ "*pgd:px%08x\n", obj->name, errs, da, iopgd, *iopgd); + return IRQ_NONE; + } + + iopte = iopte_offset(iopgd, da); + +- dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n", +- obj->name, da, iopgd, *iopgd, iopte, *iopte); ++ dev_err(obj->dev, "%s: errs:0x%08x da:0x%08x pgd:0x%p *pgd:0x%08x " ++ "pte:0x%p *pte:0x%08x\n", obj->name, errs, da, iopgd, *iopgd, ++ iopte, *iopte); + + return IRQ_NONE; + } +@@ -920,6 +915,33 @@ void iommu_put(struct iommu *obj) + } + EXPORT_SYMBOL_GPL(iommu_put); + ++int iommu_set_isr(const char *name, ++ int (*isr)(struct iommu *obj, u32 da, u32 iommu_errs, ++ void *priv), ++ void *isr_priv) ++{ ++ struct device *dev; ++ struct iommu *obj; ++ ++ dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name, ++ device_match_by_alias); ++ if (!dev) ++ return -ENODEV; ++ ++ obj = to_iommu(dev); ++ mutex_lock(&obj->iommu_lock); ++ if (obj->refcount != 0) { ++ mutex_unlock(&obj->iommu_lock); ++ return -EBUSY; ++ } ++ obj->isr = isr; ++ obj->isr_priv = isr_priv; ++ mutex_unlock(&obj->iommu_lock); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(iommu_set_isr); ++ + /* + * OMAP Device MMU(IOMMU) detection + */ +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-iommu-Gracefully-fail-iommu_enable-if-no-arch_i.patch ^ |
@@ -0,0 +1,34 @@ +From c4d52a5eb9a7e2f2a3e4f8b543aa802c681c9728 Mon Sep 17 00:00:00 2001 +From: Martin Hostettler <martin@neutronstar.dyndns.org> +Date: Thu, 24 Feb 2011 20:51:31 -0800 +Subject: [PATCH] omap: iommu: Gracefully fail iommu_enable if no arch_iommu is registered + +omap: iommu: Gracefully fail iommu_enable if no arch_iommu is registered + +In a modular build of the iommu code it's possible that the arch iommu code +isn't loaded when trying to enable the iommu. Instead of blindly following a +null pointer return -NODEV in that case. + +Signed-off-by: Martin Hostettler <martin@neutronstar.dyndns.org> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/iommu.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index b1107c0..3d8f55e 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -104,6 +104,9 @@ static int iommu_enable(struct iommu *obj) + if (!obj) + return -EINVAL; + ++ if (!arch_iommu) ++ return -ENODEV; ++ + clk_enable(obj->clk); + + err = arch_iommu->enable(obj); +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-iommu-Return-IRQ_HANDLED-in-fault-handler-when-.patch ^ |
@@ -0,0 +1,36 @@ +From 03d0402a9c370dbac5aa045a8603bbc462e4703d Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Date: Tue, 10 May 2011 14:56:46 +0200 +Subject: [PATCH] omap: iommu: Return IRQ_HANDLED in fault handler when no fault occured + +omap: iommu: Return IRQ_HANDLED in fault handler when no fault occured + +Commit d594f1f31afe13edd8c02f3854a65cc58cfb3b74 (omap: IOMMU: add +support to callback during fault handling) broke interrupt line sharing +between the OMAP3 ISP and its IOMMU. Because of this, every interrupt +generated by the OMAP3 ISP is handled by the IOMMU driver instead of +being passed to the OMAP3 ISP driver. + +Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> +Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/iommu.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index 8a51fd5..34fc31e 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -793,6 +793,8 @@ static irqreturn_t iommu_fault_handler(int irq, void *data) + clk_enable(obj->clk); + errs = iommu_report_fault(obj, &da); + clk_disable(obj->clk); ++ if (errs == 0) ++ return IRQ_HANDLED; + + /* Fault callback or TLB/PTE Dynamic loading */ + if (obj->isr && !obj->isr(obj, da, errs, obj->isr_priv)) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-iommu-print-module-name-on-error-messages.patch ^ |
@@ -0,0 +1,41 @@ +From 2adab0902e85b79ae6dbd19b4699b2d7ebe2186e Mon Sep 17 00:00:00 2001 +From: David Cohen <dacohen@gmail.com> +Date: Thu, 24 Feb 2011 20:51:32 -0800 +Subject: [PATCH] omap: iommu: print module name on error messages + +omap: iommu: print module name on error messages + +OMAP IOMMU generic layer doesn't need ot print function name during +error messages. Print module name instead which is more useful. + +Signed-off-by: David Cohen <dacohen@gmail.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/iommu.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c +index 3d8f55e..4b3218e 100644 +--- a/arch/arm/plat-omap/iommu.c ++++ b/arch/arm/plat-omap/iommu.c +@@ -809,7 +809,7 @@ static irqreturn_t iommu_fault_handler(int irq, void *data) + iopgd = iopgd_offset(obj, da); + + if (!iopgd_is_table(*iopgd)) { +- dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x\n", __func__, ++ dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x\n", obj->name, + da, iopgd, *iopgd); + return IRQ_NONE; + } +@@ -817,7 +817,7 @@ static irqreturn_t iommu_fault_handler(int irq, void *data) + iopte = iopte_offset(iopgd, da); + + dev_err(obj->dev, "%s: da:%08x pgd:%p *pgd:%08x pte:%p *pte:%08x\n", +- __func__, da, iopgd, *iopgd, iopte, *iopte); ++ obj->name, da, iopgd, *iopgd, iopte, *iopte); + + return IRQ_NONE; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-iovmm-disallow-mapping-NULL-address-when-IOVMF_.patch ^ |
@@ -0,0 +1,61 @@ +From 787e9dc67785b38ed567c728d5aaa98787403ddc Mon Sep 17 00:00:00 2001 +From: Michael Jones <michael.jones@matrix-vision.de> +Date: Wed, 9 Mar 2011 09:17:32 +0000 +Subject: [PATCH] omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set + +omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set + +commit c7f4ab26e3bcdaeb3e19ec658e3ad9092f1a6ceb allowed mapping the NULL +address if da_start==0, which would then not get unmapped. Disallow +this again if IOVMF_DA_ANON is set. And spell variable 'alignment' +correctly. + +Signed-off-by: Michael Jones <michael.jones@matrix-vision.de> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/iovmm.c | 13 +++++++------ + 1 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index 6dc1296..ea7eab9 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -271,20 +271,21 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + size_t bytes, u32 flags) + { + struct iovm_struct *new, *tmp; +- u32 start, prev_end, alignement; ++ u32 start, prev_end, alignment; + + if (!obj || !bytes) + return ERR_PTR(-EINVAL); + + start = da; +- alignement = PAGE_SIZE; ++ alignment = PAGE_SIZE; + + if (flags & IOVMF_DA_ANON) { +- start = obj->da_start; ++ /* Don't map address 0 */ ++ start = obj->da_start ? obj->da_start : alignment; + + if (flags & IOVMF_LINEAR) +- alignement = iopgsz_max(bytes); +- start = roundup(start, alignement); ++ alignment = iopgsz_max(bytes); ++ start = roundup(start, alignment); + } else if (start < obj->da_start || start > obj->da_end || + obj->da_end - start < bytes) { + return ERR_PTR(-EINVAL); +@@ -304,7 +305,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + goto found; + + if (tmp->da_end >= start && flags & IOVMF_DA_ANON) +- start = roundup(tmp->da_end + 1, alignement); ++ start = roundup(tmp->da_end + 1, alignment); + + prev_end = tmp->da_end; + } +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.6.40-omap-iovmm-don-t-check-da-to-set-IOVMF_DA_FIXED-flag.patch ^ |
@@ -0,0 +1,123 @@ +From 7e6bb756639bdab6b32445a0c9ba27ce7b057733 Mon Sep 17 00:00:00 2001 +From: David Cohen <dacohen@gmail.com> +Date: Wed, 9 Mar 2011 09:17:33 +0000 +Subject: [PATCH] omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag + +omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag + +Currently IOVMM driver sets IOVMF_DA_FIXED/IOVMF_DA_ANON flags according +to input 'da' address when mapping memory: +da == 0: IOVMF_DA_ANON +da != 0: IOVMF_DA_FIXED + +It prevents IOMMU to map first page with fixed 'da'. To avoid such +issue, IOVMM will not automatically set IOVMF_DA_FIXED. It should now +come from the user throught 'flags' parameter when mapping memory. +As IOVMF_DA_ANON and IOVMF_DA_FIXED are mutually exclusive, IOVMF_DA_ANON +can be removed. The driver will now check internally if IOVMF_DA_FIXED +is set or not. + +Signed-off-by: David Cohen <dacohen@gmail.com> +Signed-off-by: Tony Lindgren <tony@atomide.com> +--- + arch/arm/plat-omap/include/plat/iovmm.h | 2 -- + arch/arm/plat-omap/iovmm.c | 14 +++++--------- + 2 files changed, 5 insertions(+), 11 deletions(-) + +diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h +index bdc7ce5..32a2f6c 100644 +--- a/arch/arm/plat-omap/include/plat/iovmm.h ++++ b/arch/arm/plat-omap/include/plat/iovmm.h +@@ -71,8 +71,6 @@ struct iovm_struct { + #define IOVMF_LINEAR_MASK (3 << (2 + IOVMF_SW_SHIFT)) + + #define IOVMF_DA_FIXED (1 << (4 + IOVMF_SW_SHIFT)) +-#define IOVMF_DA_ANON (2 << (4 + IOVMF_SW_SHIFT)) +-#define IOVMF_DA_MASK (3 << (4 + IOVMF_SW_SHIFT)) + + + extern struct iovm_struct *find_iovm_area(struct iommu *obj, u32 da); +diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c +index ea7eab9..51ef43e 100644 +--- a/arch/arm/plat-omap/iovmm.c ++++ b/arch/arm/plat-omap/iovmm.c +@@ -279,7 +279,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + start = da; + alignment = PAGE_SIZE; + +- if (flags & IOVMF_DA_ANON) { ++ if (~flags & IOVMF_DA_FIXED) { + /* Don't map address 0 */ + start = obj->da_start ? obj->da_start : alignment; + +@@ -304,7 +304,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, + if (tmp->da_start > start && (tmp->da_start - start) >= bytes) + goto found; + +- if (tmp->da_end >= start && flags & IOVMF_DA_ANON) ++ if (tmp->da_end >= start && ~flags & IOVMF_DA_FIXED) + start = roundup(tmp->da_end + 1, alignment); + + prev_end = tmp->da_end; +@@ -651,7 +651,6 @@ u32 iommu_vmap(struct iommu *obj, u32 da, const struct sg_table *sgt, + flags &= IOVMF_HW_MASK; + flags |= IOVMF_DISCONT; + flags |= IOVMF_MMIO; +- flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); + + da = __iommu_vmap(obj, da, sgt, va, bytes, flags); + if (IS_ERR_VALUE(da)) +@@ -691,7 +690,7 @@ EXPORT_SYMBOL_GPL(iommu_vunmap); + * @flags: iovma and page property + * + * Allocate @bytes linearly and creates 1-n-1 mapping and returns +- * @da again, which might be adjusted if 'IOVMF_DA_ANON' is set. ++ * @da again, which might be adjusted if 'IOVMF_DA_FIXED' is not set. + */ + u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) + { +@@ -710,7 +709,6 @@ u32 iommu_vmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) + flags &= IOVMF_HW_MASK; + flags |= IOVMF_DISCONT; + flags |= IOVMF_ALLOC; +- flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); + + sgt = sgtable_alloc(bytes, flags, da, 0); + if (IS_ERR(sgt)) { +@@ -781,7 +779,7 @@ static u32 __iommu_kmap(struct iommu *obj, u32 da, u32 pa, void *va, + * @flags: iovma and page property + * + * Creates 1-1-1 mapping and returns @da again, which can be +- * adjusted if 'IOVMF_DA_ANON' is set. ++ * adjusted if 'IOVMF_DA_FIXED' is not set. + */ + u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes, + u32 flags) +@@ -800,7 +798,6 @@ u32 iommu_kmap(struct iommu *obj, u32 da, u32 pa, size_t bytes, + flags &= IOVMF_HW_MASK; + flags |= IOVMF_LINEAR; + flags |= IOVMF_MMIO; +- flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); + + da = __iommu_kmap(obj, da, pa, va, bytes, flags); + if (IS_ERR_VALUE(da)) +@@ -839,7 +836,7 @@ EXPORT_SYMBOL_GPL(iommu_kunmap); + * @flags: iovma and page property + * + * Allocate @bytes linearly and creates 1-1-1 mapping and returns +- * @da again, which might be adjusted if 'IOVMF_DA_ANON' is set. ++ * @da again, which might be adjusted if 'IOVMF_DA_FIXED' is not set. + */ + u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) + { +@@ -859,7 +856,6 @@ u32 iommu_kmalloc(struct iommu *obj, u32 da, size_t bytes, u32 flags) + flags &= IOVMF_HW_MASK; + flags |= IOVMF_LINEAR; + flags |= IOVMF_ALLOC; +- flags |= (da ? IOVMF_DA_FIXED : IOVMF_DA_ANON); + + da = __iommu_kmap(obj, da, pa, va, bytes, flags); + if (IS_ERR_VALUE(da)) +-- +1.7.0.4 + | ||
[-] [+] | Added | linux-2.61-HSI-hsi_char-hsi_char_ioctl-compilation-warning.patch ^ |
@@ -0,0 +1,32 @@ +From dc0afe0a736190e57cb494a2969f2a3fab0c32e0 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen <ilkka.koskinen@nokia.com> +Date: Thu, 10 Feb 2011 18:03:43 +0200 +Subject: [PATCH 1/3] HSI: hsi_char: hsi_char_ioctl() compilation warning + +hsi_char_ioctl() is assigned to unlocked_ioctl instead of ioctl. +The types differ from each other, which resulted in assigning +a wrong type of function point. + +Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com> +--- + drivers/hsi/clients/hsi_char.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c +index 9767412..1ba7d84 100644 +--- a/drivers/hsi/clients/hsi_char.c ++++ b/drivers/hsi/clients/hsi_char.c +@@ -720,8 +720,8 @@ static inline void hsi_char_tx2ecfg(struct hsc_tx_config *tx_cfg, + tx_cfg->arb_mode = cfg->arb_mode; + } + +-static long hsi_char_ioctl(struct inode *inode, struct file *file, +- unsigned int cmd, unsigned long arg) ++static long hsi_char_ioctl(struct file *file, unsigned int cmd, ++ unsigned long arg) + { + struct hsi_char_channel *channel = file->private_data; + unsigned int state; +-- +1.7.0.4 + | ||
[-] [+] | Added | kernel-adaptation-n900.config ^ |
@@ -0,0 +1,2559 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.37-1-n900 Kernel Configuration +# Wed Mar 13 20:25:18 2013 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +CONFIG_KERNEL_LZMA=y +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_AUDIT=y +# CONFIG_HAVE_GENERIC_HARDIRQS is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +# CONFIG_TINY_RCU is not set +# CONFIG_TINY_PREEMPT_RCU is not set +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_NS is not set +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_MM_OWNER=y +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_LZO=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +CONFIG_PROFILING=y +CONFIG_TRACEPOINTS=y +CONFIG_OPROFILE=m +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_HW_BREAKPOINT=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set +CONFIG_BLK_DEV_THROTTLING=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +CONFIG_IOSCHED_CFQ=y +CONFIG_CFQ_GROUP_IOSCHED=y +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set | ||
[-] [+] | Added | kernel-adaptation-n900.yaml ^ |
@@ -0,0 +1,78 @@ +# See: http://wiki.merproject.org/wiki/Adaptation_Guide/Step_by_step +# for documentation of this file. + +Name: kernel-adaptation-n900 +# The text following "kernel-adaptation-" is put into the +# %{kernel_target_hw} macro by the .spec file. Typically +# you make an OBS package called kernel-adaptation-<devicecodename> + +Summary: Kernel Adaptation %{kernel_target_hw} +Description: Kernel for %{kernel_target_hw}. + +# The Version: is used in paths and must match the version +# used in the src "make install" - it's also used for the +# tarball name +Version: 2.6.37 +Release: 1 +Group: Kernel/Linux Kernel +License: GPLv2 +Configure: none +Builder: none + +Macros: + # Set these values based on the features in your own adaptation. + - builds_uImage;1 + +#URL: not required but useful to identify where the source can be found. + +RequiresPost: + # We are running depmod in the post thus this requirement + - kmod >= 9 + +PkgConfigBR: +# ncurses is useful if you chroot into the kernel build area and want +# "make menuconfig" + - "ncurses" + +# When available the kernel-check-mer package will be used to validate +#the .config +PkgBR: + # In case your adaptation uses uImages for booting you need to include + # u-boot-tools package from your adaptation to kernel build. + - "u-boot-tools" + - "mer-kernel-checks" + # depmod is used when building the kernel by toplevel Makefile + # that calls scripts/depmod.sh + - kmod >= 9 + # Perl is used to modify EXTRAVERSION in kernel config + - perl + +Sources: + - linux-2.6.37.tar.bz2 + - "%{name}.config" + - series.conf + +# Insert any Patches: section here + +Provides: + - "kernel = %{kernel_version}" + +RunFdupes: + - "/%{_prefix}/src/kernels/%{kernel_version_build}/" + +Files: + - "/lib/modules/%{kernel_version_build}/*" + - "/boot/System.map-%{kernel_version_build}" + - "/boot/config-%{kernel_version_build}" + +SubPackages: + - Name: devel + Summary: Devel files for %{kernel_target_hw} kernel + Group: Development/System + Description: | + Devel for %{kernel_target_hw} kernel + Provides: + - "kernel-devel = %{kernel_version}" + Files: + - "/%{_prefix}/src/kernels/%{kernel_version_build}/*" + - "/%{_prefix}/src/kernels/%{kernel_version_build}/.config" | ||
Added | linux-2.6.37.tar.bz2 ^ | |
[-] [+] | Added | series.conf ^ |
@@ -0,0 +1,245 @@ +##################################################################### +# +# Nokia N900 patches +# Section maintainer: Ilkka Koskinen <ilkka.koskinen@nokia.com> +# + +# USB +linux-2.6-usb-musb-add-mA-and-charger-sysfs-entries.patch +linux-2.6-usb-musb-add-suspend-sysfs-entry.patch +linux-2.6-usb-otg-add-detect_charger-field-to-otg_transceiver.patch +linux-2.6-usb-musb-ignore-spurious-SESSREQ-interrupts.patch +linux-2.6-usb-otg-introduce-otg_notify_event-and-otg_get_last_.patch + +# PM, Clock +linux-2.6-OMAP2-3-clock-implement-clock-rate-parent-change-not.patch +linux-2.6-PM-export-missing-symbols.patch + +# Touchscreen +linux-2.6.38-input-touchscreen-introduce-tsc2005-driver.patch +linux-2.6.38-omap-rx-51-enable-tsc2005.patch + +# Bluetooth +linux-2.6-Bluetooth-Support-for-n900-bluetooth-hardware.patch +linux-2.6-hci_h4p-Fix-module-auto-loading.patch +linux-2.6-Bluetooth-Add-sysfs-interface-for-hci_h4p-driver-to-.patch + +# AD Converter +linux-2.6-mfd-twl4030-Driver-for-twl4030-madc-module.patch + +# Accelerometer +linux-2.6-omap-rx51-Platform-support-for-lis3lv02d-acceleromet.patch + +# TVout, Audio, FM, +linux-2.6-ASoC-RX-51-Add-stereo-audio-output-to-AV-jack.patch +linux-2.6-V4L-DVB-radio-si4713-Add-regulator-framework-support.patch +linux-2.6-omap-rx51-Add-initialization-and-platform-data-for-S.patch +linux-2.6-ASoC-RX-51-Add-support-for-FM-transmitter.patch +linux-2.6-ASoC-RX-51-Add-aic34b_dummy-driver-only-for-the-RX-5.patch +linux-2.6-omap-rx51-Add-second-instance-of-the-TLV320AIC34-cod.patch +linux-2.6-ASoC-RX-51-Add-support-for-earpiece.patch +linux-2.6-ASoC-RX-51-Add-mic-input-to-AV-jack.patch +linux-2.6-SoC-RX-51-Add-route-for-AIC34B-generated-mic-bias.patch +linux-2.6-ASoC-omap-rx51-Report-headset-instead-of-video-out-i.patch +linux-2.6-enabled-vdda_dac-regulator-support-tvout-on-rx51.patch +linux-2.6-Added-video-data-to-support-tvout-on-rx51.patch + +# PM +linux-2.6-OMAP2-3-PRCM-export-cm_read_mod_reg-and-cm_write_mod.patch + +# g_nokia +linux-2.6-EEM-support-for-g_nokia.patch + +# Leds +linux-2.6-omap3-rx51-Platform-support-for-lp5523-led-chip.patch +linux-2.6-38-leds-leds-lp5523-modify-the-way-of-setting-led-devic.patch +linux-2.6-38-leds-lp5523-fix-circular-locking.patch + +# Keypad +linux-2.6-N900-Set-keypad-slide-gpio-as-active-low.patch + +# TWL4030 power +linux-2.6-mfd-Implement-twl4030-poweroff.patch +linux-2.6-HACK-mfd-twl4030-power-disable-scripts.patch + +# HSI, CMT +linux-2.6-HSI-CMT-patcheset-incl.-fixes-bmc-7505-bmc-9563.patch + +# Charger +linux-2.6-power_supply-isp1704-patches.patch +linux-2.6-HACK-sysfs_notify-support-for-isp1704-charger-driver.patch + + +# Display, 3D acceleration +linux-2.6-DSS2-patches.patch +linux-2.6-SGX-PVR-patchset.patch +linux-2.6-RX-51-add-SGX-platform-device.patch + +# WL1251 +linux-2.6-wlan-added-netlink-support-for-wl1251-driver.patch + +# Media Controller, OMAP ISP, Camera +linux-2.6-Camera-for-Meego-N900-Adaptation-kernel-2.6.37-patch.patch +linux-2.6-omap-iommu-Compile-in-as-it-doesn-t-work-as-module.patch + +# Bug fixes, misc. +linux-2.61-HSI-hsi_char-hsi_char_ioctl-compilation-warning.patch +linux-2.6-omap-rx51-mark-reserved-memory-earlier.patch +linux-2.6.39-omap-rx51-Add-support-for-vibra.patch +linux-2.6-ASoC-omap-RX-51-Workaround-aic34b_dummy-to-work-with.patch +linux-2.6-input-tsc2005-Fix-mouse-device-compatibility-issue.patch +linux-2.6.38-wl1251-fix-queue-stopping-waking-for-TX-path.patch +linux-2.6.38-wl1251-fix-4-byte-TX-buffer-alignment.patch +linux-2.6.39-ASoC-omap-rx51-Enable-McBSP2-sidetone.patch +linux-2.6-watchdog-omap-wdt-add-fine-grain-runtime-pm.patch +linux-2.6.39-omap3-wdtimer-fix-core-idle-transition.patch +linux-2.6-rtc-twl-Switch-to-using-threaded-irq.patch +linux-2.6.39-RX-51-Enable-isp1704-power-on-off.patch +linux-2.6.39-isp1704_charger-allow-board-specific-powering-routin.patch +linux-2.6.39-bq27x00-battery-status-monitoring-backport.patch +linux-2.6-omap-rx51-bq27x00-i2c-address.patch + +# Smartreflex, cpufreq, OPP and DVFS +linux-2.6.38-sr-0001-OMAP3-PM-Adding-voltage-driver-support.patch +linux-2.6.38-sr-0002-OMAP-Introduce-voltage-domain-information-in-the-hwm.patch +linux-2.6.38-sr-0003-OMAP3-PM-Adding-smartreflex-driver-support.patch +linux-2.6.38-sr-0004-OMAP3-PM-Adding-smartreflex-device-file.patch +linux-2.6.38-sr-0005-OMAP3-PM-Adding-smartreflex-hwmod-data.patch +linux-2.6.38-sr-0006-OMAP3-PM-Adding-smartreflex-class3-driver.patch +linux-2.6.38-sr-0007-OMAP3-PM-Register-TWL4030-pmic-info-with-the-voltage.patch +linux-2.6.38-sr-0008-OMAP3-PM-Adding-debug-support-to-Voltage-and-Smartre.patch +linux-2.6.38-sr-0009-OMAP3-PM-Program-correct-init-voltages-for-VDD1-and-.patch +linux-2.6-cpufreq-0010-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch +linux-2.6-cpufreq-0011-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch +linux-2.6-cpufreq-0012-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch +linux-2.6-cpufreq-0013-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch +linux-2.6-cpufreq-0014-cpufreq-fixup-after-new-OPP-layer-merged.patch +linux-2.6-opp-0015-omap-opp-add-OMAP3-OPP-table-data-and-common-init.patch +linux-2.6-opp-0016-OMAP3-4-OPP-make-omapx_opp_init-non-static.patch +linux-2.6-dvfs-0017-OMAP-Introduce-accessory-APIs-for-DVFS.patch +linux-2.6-dvfs-0018-OMAP-Introduce-device-specific-set-rate-and-get-rate.patch +linux-2.6-dvfs-0019-OMAP-Implement-Basic-DVFS.patch +linux-2.6-dvfs-0020-OMAP-Introduce-dependent-voltage-domain-support.patch +linux-2.6-dvfs-0021-OMAP-Introduce-device-scale-implementation.patch +linux-2.6-dvfs-0022-OMAP-Disable-Smartreflex-across-DVFS.patch +linux-2.6-dvfs-0023-OMAP3-Introduce-custom-set-rate-and-get-rate-APIs-fo.patch +linux-2.6-dvfs-0024-OMAP3-cpufreq-driver-changes-for-DVFS-support.patch +linux-2.6-dvfs-0025-OMAP3-Introduce-voltage-domain-info-in-the-hwmod-str.patch +linux-2.6-dvfs-0026-OMAP3-Add-voltage-dependency-table-for-VDD1.patch +linux-2.6-dvfs-0027-OMAP-Add-DVFS-Documentation.patch +linux-2.6-dvfs-0028-OMAP3-cpufreq-Fix-loops_per_jiffy-calculation.patch +linux-2.6-dvfs-0029-OMAP3-cpufreq-Fix-uninitialzed-freqs.new-variable.patch +linux-2.6-dvfs-0030-OMAP3-cpufreq-Use-dpll1_ck-clock-instead-of-arm_fck-.patch +linux-2.6-dvfs-0032-rx51-add-board-OPP-init-to-disable-125MHz-from-avail.patch + +# wl1251 idle mode +linux-2.6.39-0001-wl1251-enable-beacon-early-termination-while-in-powe.patch +linux-2.6.39-0002-wl1251-implement-connection-quality-monitoring.patch +linux-2.6.39-0003-wl1251-remove-wl1251_ps_set_elp-function.patch +linux-2.6.39-0004-wl1251-fix-elp_work-race-condition.patch +linux-2.6.39-0005-wl1251-Prepare-for-idle-mode-support.patch +linux-2.6.39-0006-wl1251-Add-support-for-idle-mode.patch + +# power savings +linux-2.6-twl4030-madc-Add-proper-regulator-handling.patch +linux-2.6-N900-musb-fix-regulator-init-at-boot.patch +linux-2.6-OMAP3-DSS-allow-board-specific-SDI-pin-muxing.patch +linux-2.6-RX-51-Set-pin-muxing-hooks-for-SDI-on-off.patch +linux-2.6-OMAP3-ISP-Add-regulator-control-for-omap34xx.patch +linux-2.6-OMAP3-RX-51-define-vdds_csib-regulator-supply.patch +linux-2.6-OMAP3-rx-51-Add-full-regulator-definitions.patch + +# Camera hacks +linux-2.6-rx51-don-t-build-broken-smia-sensor-driver.patch +linux-2.6-isppreview-new-default-coeffs-for-more-ambient-indep.patch +linux-2.6-Revert-et8ek8-Call-configure_interface-when-configur.patch +linux-2.6-et8ek8-replaces-et8ek8-Call-configure_interface-when.patch + +# wlan update, ad-hoc mode etc +linux-2.6.39-wl1251-add-power-callback-to-wl1251_if_operations.patch +linux-2.6.39-wl1251-add-runtime-PM-support-for-SDIO.patch +linux-2.6.39-wl1251-use-wl12xx_platform_data-to-pass-data.patch +linux-2.6.39-wl1251-wl12xx_get_platform_data-returns-an-ERR_PTR.patch +linux-2.6.39-wl1251-remove-unnecessary-import.patch +linux-2.6.39-wireless-wl1251-Fix-potential-NULL-pointer-dereferen.patch +linux-2.6.39-wl1251-enable-adhoc-mode.patch +linux-2.6.39-wl1251-set-rate-index-and-preamble-flag-on-received-.patch + +# misc +linux-2.6-RX-51-set-SGX-maximum-clock-rate-to-platform_data.patch +linux-2.6-drivers-media-video-smiaregs.c-downgrade-KERN_ALERT-.patch +linux-2.6-omap-rx51-Set-regulator-V28_A-always-on.patch +linux-2.6-omap-rx51-Don-t-power-up-speaker-amplifier-at-bootup.patch +linux-2.6-ASoC-tlv320aic3x-Don-t-sync-first-two-registers-from.patch +linux-2.6-ASoC-tlv320aic3x-Do-soft-reset-to-codec-when-going-t.patch +linux-2.6-tsc2005-responsibility-improvements.patch + +# iommu/iovmm +linux-2.6.40-ARM-io-make-iounmap-a-simple-macro.patch +linux-2.6.40-OMAP-iovmm-no-gap-checking-for-fixed-address.patch +linux-2.6.40-OMAP-iovmm-add-superpages-support-to-fixed-da-addres.patch +linux-2.6.40-OMAP-iovmm-replace-__iounmap-with-iounmap.patch +linux-2.6.40-OMAP-iommu-create-new-api-to-set-valid-da-range.patch +linux-2.6.40-omap-IOMMU-add-missing-function-declaration.patch +linux-2.6.40-OMAP2-IOMMU-don-t-print-fault-warning-on-specific-la.patch +linux-2.6.40-omap-iommu-Gracefully-fail-iommu_enable-if-no-arch_i.patch +linux-2.6.40-omap-iommu-print-module-name-on-error-messages.patch +linux-2.6.40-omap-IOMMU-add-support-to-callback-during-fault-hand.patch +linux-2.6.40-omap-iovmm-disallow-mapping-NULL-address-when-IOVMF_.patch +linux-2.6.40-omap-iovmm-don-t-check-da-to-set-IOVMF_DA_FIXED-flag.patch +linux-2.6.40-arm-plat-omap-iommu-fix-request_mem_region-error-pat.patch +linux-2.6.40-omap-iommu-Return-IRQ_HANDLED-in-fault-handler-when-.patch +linux-2.6-omap3-iovmm-Work-around-sg_alloc_table-size-limitati.patch +linux-2.6-omap3-iovmm-Support-non-page-aligned-buffers-in-iomm.patch + +# zram +linux-2.6.38-staging-zram-Fix-sparse-warning-Using-plain-integer-.patch +linux-2.6.38-staging-zram-fix-data-corruption-issue.patch +linux-2.6.39-Staging-zram-round-up-the-disk-size-provided-by-user.patch +linux-2.6.39-Staging-zram-make-zram_read-return-a-bio-error-if-th.patch |
Submit package nemo:devel:...omap3:n900 / libcal-rx-51-bin (revision 1) to package nemo:testin...omap3:n900 / libcal-rx-51-bin
[-] [+] | Added | libcal-rx-51-bin.changes |
[-] [+] | Added | libcal-rx-51-bin.spec ^ |
Added | libcal-rx-51-bin-0.2.5-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | libcal-rx-51-bin.yaml ^ |
@@ -0,0 +1,25 @@ +Name: libcal-rx-51-bin +Summary: Libcal binary +Version: 0.2.5 +Release: 0 +Group: System/Libraries +License: Nokia Proprietary +Description: | + Libcal binary for Nokia N900. +ExclusiveArch: "%arm" +Provides: + - libcal +Sources: + - "%{name}-%{version}-armv7hl.tar.bz2" + - "license.txt" + +SetupOptions: -q -n %{name}-%{version}-armv7hl +Configure: none +Builder: none + +Files: + # TODO: What generates this file? + - "%exclude %{_libdir}/documentation.list" + - "%{_libdir}/libcal.so.1.0.0" + - "%{_libdir}/libcal.so.1" + - "%doc license.txt" | ||
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + |
Submit package nemo:deve...map3:n900 / liblocation-headers (revision 1) to package nemo:test...map3:n900 / liblocation-headers
[-] [+] | Added | liblocation-headers.changes |
[-] [+] | Added | liblocation-headers.spec ^ |
[-] [+] | Added | copyright.txt ^ |
@@ -0,0 +1,13 @@ +This file is part of liblocation + +Copyright (C) 2008-2011 Nokia Corporation. All rights reserved. + +Contact: Quanyi Sun <Quanyi.Sun@nokia.com> + +This software, including documentation, is protected by copyright controlled by +Nokia Corporation. All rights are reserved. Copying, including reproducing, +storing, adapting or translating, any or all of this material requires the prior +written consent of Nokia Corporation. This material also contains confidential +information which may not be disclosed to others without the prior written +consent of Nokia. + | ||
Added | liblocation-headers-0.102.tar.bz2 ^ | |
[-] [+] | Added | liblocation-headers.yaml ^ |
@@ -0,0 +1,18 @@ +Name: liblocation-headers +Summary: Liblocation development headers +Version: 0.102 +Release: 0 +Group: Location/Location Adaptation +License: Nokia Proprietary +Description: | + Development headers for (closed-source) liblocation. Liblocation is a utility library for performing GPS related functions on the Nokia N900 device. +ExclusiveArch: "%{arm}" + +Sources: + - "%{name}-%{version}.tar.bz2" + - "license.txt" + - "copyright.txt" + +Configure: none +Builder: none + | ||
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + |
Submit package nemo:devel:hw:ti:omap3:n900 / libmlocknice (revision 1) to package nemo:testing:...i:omap3:n900 / libmlocknice
[-] [+] | Added | libmlocknice.changes |
[-] [+] | Added | libmlocknice.spec ^ |
[-] [+] | Added | libmlocknice.yaml ^ |
@@ -0,0 +1,16 @@ +Name: libmlocknice +Summary: Memory Locking library for maemo applications - shared library +Version: 0.1 +Release: 0 +Group: System/Libraries +License: GPLv2.1 +Sources: + - http://repository.maemo.org/pool/fremantle/free/libm/libmlocknice/%{name}_%{version}+0m5.tar.gz +Description: Memory Locking library for maemo applications - shared library. + +SubPackages: + - Name: devel + Summary: Memory Locking library for maemo applications - development files + Group: Development/Libraries + Description: Memory Locking library for maemo applications - development files. + | ||
Added | libmlocknice_0.1+0m5.tar.gz ^ |
Submit package nemo:devel:hw:ti:omap3:n900 / libppu-bin (revision 1) to package nemo:testing:hw:ti:omap3:n900 / libppu-bin
[-] [+] | Added | libppu-bin.changes |
[-] [+] | Added | libppu-bin.spec ^ |
[-] [+] | Added | boss.conf ^ |
@@ -0,0 +1,4 @@ +[checks] +check_package_is_complete = warn +check_package_is_complete_sources = warn + | ||
Added | libppu-bin-0.1-armv7hl.tar.bz2 ^ | |
Added | libppu-bin-0.1-armv7l.tar.bz2 ^ | |
[-] [+] | Added | libppu-bin.yaml ^ |
@@ -0,0 +1,17 @@ +Name: libppu-bin +Summary: Library to access ppu data +Version: 0.1 +Release: 0 +Group: Communications/Connectivity Adaptation +License: Nokia Proprietary +Sources: + - "%{name}-%{version}-%{_target_cpu}.tar.bz2" + - "license.txt" + - boss.conf + +Description: Library to read pp_data from calibration area. +ExclusiveArch: "%arm" + +SetupOptions: "-q -n %{name}-%{version}-%{_target_cpu}" +Configure: none +Builder: none | ||
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + |
Submit package nemo:devel:hw:ti:omap3:n900 / libwl1251-bin (revision 1) to package nemo:testing...i:omap3:n900 / libwl1251-bin
[-] [+] | Added | libwl1251-bin.changes |
[-] [+] | Added | libwl1251-bin.spec ^ |
[-] [+] | Added | boss.conf ^ |
@@ -0,0 +1,3 @@ +[checks] +check_package_is_complete = warn +check_package_is_complete_sources = warn | ||
Added | libwl1251-bin-0.14-armv7hl.tar.bz2 ^ | |
Added | libwl1251-bin-0.14-armv7l.tar.bz2 ^ | |
[-] [+] | Added | libwl1251-bin.yaml ^ |
@@ -0,0 +1,17 @@ +Name: libwl1251-bin +Summary: Shared library for wl1251 +Version: 0.14 +Release: 0 +Group: Communications/Connectivity Adaptation +License: Nokia Proprietary +Sources: + - "%{name}-%{version}-%{_target_cpu}.tar.bz2" + - "license.txt" + - boss.conf + +Description: Libwl1251 is the user space library for TI wl1251 WLAN chipset. +ExclusiveArch: "%arm" + +SetupOptions: "-q -n %{name}-%{version}-%{_target_cpu}" +Configure: none +Builder: none | ||
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + |
Submit package nemo:deve...ap3:n900 / location-...on-rx-51 (revision 1) to package nemo:test...ap3:n900 / location-...on-rx-51
[-] [+] | Added | location-adaptation-rx-51.changes |
[-] [+] | Added | location-adaptation-rx-51.spec ^ |
Added | libisi-bin-1.4.2-1-armv7hl.tar.bz2 ^ | |
Added | liblas-bin-1.0.2-1-armv7hl.tar.bz2 ^ | |
Added | liblocation-bin-0.102-2-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + | ||
[-] [+] | Added | location-adaptation-rx-51.yaml ^ |
@@ -0,0 +1,87 @@ +Name: location-adaptation-rx-51 +Summary: Location adaptation SW for N900 +Version: 0.2 +Release: 0 +Group: Location/Location Adaptation +License: Nokia Proprietary +Description: | + This package provides the location adaptation software stack (below GeoClue) and QtMobility) for the Nokia N900 Device. +ExclusiveArch: "%{arm}" + +Sources: + - "libisi-bin-%{_libisi_version}-armv7hl.tar.bz2" + - "liblas-bin-%{_liblas_version}-armv7hl.tar.bz2" + - "liblocation-bin-%{_liblocation_version}-armv7hl.tar.bz2" + - "location-daemon-bin-%{_location_daemon_version}-armv7hl.tar.bz2" + - "location-proxy-bin-%{_location_proxy_version}-armv7hl.tar.bz2" + - "location-settings-default-bin-%{_location_settings_default_version}-noarch.tar.bz2" + - "license.txt" + +NoSetup: yes +Configure: none +Builder: none +NoFiles: yes + +#Provides: +# - libisi +# - liblas +# - liblocation +# - location-daemon +# - location-proxy +# - location settings-default + +SubPackages: + - Name: libisi-bin + AsWholeName: yes + Summary: ISI library runtime + Group: Location/Location Adaptation + Description: ISI library is for sending/receiving and coding/decoding ISI messages. + Provides: + - "libisi" + + - Name: liblas-bin + AsWholeName: yes + Summary: Shared library for Location Adaptation Service + Group: Location/Location Adaptation + Description: Library that provides services for a communication between MeeGo user space and CellMo Location Server. + Provides: + - "liblas" + + - Name: liblocation-bin + AsWholeName: yes + Summary: Liblocation + Group: Location/Location Adaptation + Description: Utility library for performing GPS related functions. + Provides: + - "liblocation" + Requires: + - location-proxy + - location-daemon + + - Name: location-daemon-bin + AsWholeName: yes + Summary: Location Daemon + Group: Location/Location Adaptation + Description: Daemon for controlling internal location server. Implements a Gypsy-like DBUS interface. + Provides: + - "location-daemon" + Requires: + - location-proxy + + - Name: location-proxy-bin + AsWholeName: yes + Summary: Location Proxy + Group: Location/Location Adaptation + Description: Proxy daemon for handling SUPL (assisted GPS) connection for modem. + Provides: + - "location-proxy" + Requires: + - mssf-certman-common-ca + - location-settings-default + + - Name: location-settings-default + AsWholeName: yes + Summary: Default settings for location adaptation on Nokia N900 + Group: Location/Location Adaptation + Description: Gconf default settings for location adaptation on Nokia N900. + | ||
Added | location-daemon-bin-0.98-4-armv7hl.tar.bz2 ^ | |
Added | location-proxy-bin-0.100-4-armv7hl.tar.bz2 ^ | |
Added | location-settings-default-bin-0.2-2-noarch.tar.bz2 ^ |
Submit package nemo:devel:hw:ti:omap3:n900 / mkinitrd (revision 1) to package nemo:testing:hw:ti:omap3:n900 / mkinitrd
[-] [+] | Added | mkinitrd.changes |
[-] [+] | Added | mkinitrd.spec ^ |
[-] [+] | Added | fix-a-weird-btrfs-root-issue.patch ^ |
@@ -0,0 +1,13 @@ +diff --git a/mkliveinitrd b/mkliveinitrd +index 66167be..ba575b4 100755 +--- a/mkliveinitrd ++++ b/mkliveinitrd +@@ -667,7 +667,7 @@ do_live_from_base_loop() { + + # set up new /dev/root symlink + rm -f /dev/root +- ln -s /dev/mapper/live-rw /dev/root ++ ln -fs /dev/mapper/live-rw /dev/root + + mount -n /dev/mapper/live-rw /sysroot + # here you can modify the rw ext3 fs for testing if you don't want to | ||
[-] [+] | Added | mkinitrd-lsb-functions-optional.patch ^ |
@@ -0,0 +1,12 @@ +diff -Nurb mkinitrd-7.0.17-/mkinitrd mkinitrd-7.0.17/mkinitrd +--- mkinitrd-7.0.17-/mkinitrd 2010-02-08 06:59:11.000000000 -0800 ++++ mkinitrd-7.0.17/mkinitrd 2011-04-19 10:35:51.653284349 -0700 +@@ -56,7 +56,7 @@ + PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH + export PATH + +-. /etc/rc.d/init.d/functions ++[ ! -f /etc/rc.d/init.d/functions ] || . /etc/rc.d/init.d/functions + + # Set the umask. For iscsi, the initrd can contain plaintext + # password (chap secret), so only allow read by owner. | ||
[-] [+] | Added | mkmrstinitrd.patch ^ |
@@ -0,0 +1,40 @@ +diff -Naur a/mkmrstinitrd b/mkmrstinitrd +--- a/mkmrstinitrd 2010-02-08 06:59:11.000000000 -0800 ++++ b/mkmrstinitrd 2010-08-11 12:31:32.799176760 -0700 +@@ -377,6 +377,8 @@ + thingtomount=/dev/root + ;; + /dev/*) ++ ln -s $root /dev/root ++ thingtomount=$root + ;; + *) + thingtomount=$root +@@ -407,15 +409,18 @@ + echo "checking device /dev/${device}" + if [ -e /sys/block/${device}/removable ] + then +- echo "found harddisk at /dev/${device}" +- found="yes" +- devtype="mmc" +- while [ ! -e /dev/${device} ] +- do +- sleep 5 +- echo "." +- done +- break ++ if [ -e /dev/${device}p1 ] ++ then ++ echo "found harddisk at /dev/${device}" ++ found="yes" ++ devtype="mmc" ++ while [ ! -e /dev/${device} ] ++ do ++ sleep 5 ++ echo "." ++ done ++ break ++ fi + fi + done + | ||
[-] [+] | Added | modprobe_conf.patch ^ |
@@ -0,0 +1,49 @@ +Index: mkinitrd-7.0.17/mkliveinitrd +=================================================================== +--- mkinitrd-7.0.17.orig/mkliveinitrd ++++ mkinitrd-7.0.17/mkliveinitrd +@@ -147,10 +147,6 @@ fi + # Copy /etc/fstab over + cp /etc/fstab etc + +-# Copy modprobe.conf and friends over +-if [ -e /etc/modprobe.conf ] ; then +- cp /etc/modprobe.conf etc +-fi + cp -R /etc/modprobe.d etc + + # Copy binaries over +@@ -307,7 +303,7 @@ for o in `cat /proc/cmdline` ; do + ;; + blacklist=*) + blacklist=${o#blacklist=} +- echo "blacklist $blacklist" >> /etc/modprobe.conf ++ echo "blacklist $blacklist" >> /etc/modprobe.d/blacklist.conf + ;; + *) + m=$(echo $o |cut -s -d . -f 1) +@@ -320,11 +316,13 @@ for o in `cat /proc/cmdline` ; do + if [ -z "$p" -o -z "$v" ]; then + continue + fi +- echo "options $m $p=$v" >> /etc/modprobe.conf ++ echo "options $m $p=$v" >> /etc/modprobe.d/$m.conf + ;; + esac + done + ++pushd /etc; ln -sf ../proc/self/mounts mtab; popd ++ + if [ "$quiet" != "1" ] ; then + echo "kernel commandline: `cat /proc/cmdline`" + fi +@@ -681,9 +679,6 @@ do_live_from_base_loop() { + echo "LANG=$live_locale" > /sysroot/etc/sysconfig/i18n + fi + +- # copy over module options +- [ -f /etc/modprobe.conf ] && cat /etc/modprobe.conf >> /sysroot/etc/modprobe.conf +- + # create rule so udev creates /dev/live symlink on real rootfs + if [ -n "$CDLABEL" ]; then + echo "KERNEL==\"hd[a-z]\", SUBSYSTEMS==\"ide\", ATTRS{removable}==\"1\", ATTRS{media}==\"cdrom\", PROGRAM=\"/sbin/blkid -s LABEL -o value %N\", RESULT==\"$CDLABEL\", SYMLINK+=\"live\"" >> /sysroot/lib/udev/rules.d/50-udev* | ||
[-] [+] | Added | mount-run-and-create-dirs-for-udev.patch ^ |
@@ -0,0 +1,16 @@ +diff --git a/mkliveinitrd b/mkliveinitrd +index ea5b0b8..c3c09a7 100755 +--- a/mkliveinitrd ++++ b/mkliveinitrd +@@ -248,6 +248,11 @@ mount -n -t sysfs sysfs /sys + + echo "" > /proc/sys/kernel/hotplug + ++mkdir -p -m 0755 /run ++mount -t tmpfs -o mode=0755,nodev,noexec,nosuid tmpfs /run >/dev/null 2>&1 ++mkdir -m 0755 /run/udev /run/udev/rules.d ++export UDEVRULESD=/run/udev/rules.d ++ + # Declare all variables here.. mostly for housekeeping + # + init="/sbin/init" | ||
[-] [+] | Added | systemd_mkinitrd_live_mrst.patch ^ |
@@ -0,0 +1,44 @@ +diff -uprN mkinitrd-7.0.17/mkliveinitrd mkinitrd-7.0.17-NEW/mkliveinitrd +--- mkinitrd-7.0.17/mkliveinitrd 2010-04-12 02:52:05.000000000 -0700 ++++ mkinitrd-7.0.17-NEW/mkliveinitrd 2011-05-11 16:19:22.550847749 -0700 +@@ -173,8 +173,7 @@ cp /sbin/udevadm sbin + cp /sbin/udevd sbin + cp /sbin/insmod sbin + cp /sbin/modprobe sbin +-cp /sbin/pidof sbin +-cp /sbin/killall5 sbin ++cp /usr/bin/killall sbin + cp /usr/sbin/chroot sbin + + cp /sbin/blkid sbin +@@ -822,7 +821,7 @@ fi + if [ -x /sysroot$init ] ; then + + # Leave initramfs and transition to rootfs +- kill `pidof udevd` ++ killall udevd + if [ "$quiet" != "1" ] ; then + echo "transfering control to $init" + fi +diff -uprN mkinitrd-7.0.17/mkmrstinitrd mkinitrd-7.0.17-NEW/mkmrstinitrd +--- mkinitrd-7.0.17/mkmrstinitrd 2010-02-08 06:59:11.000000000 -0800 ++++ mkinitrd-7.0.17-NEW/mkmrstinitrd 2011-05-11 16:19:49.709412234 -0700 +@@ -114,8 +114,7 @@ cp /sbin/udevadm sbin + cp /sbin/udevd sbin + cp /sbin/insmod sbin + cp /sbin/modprobe sbin +-cp /sbin/pidof sbin +-cp /sbin/killall5 sbin ++cp /usr/bin/killall sbin + cp /usr/sbin/chroot sbin + + cp /sbin/blkid sbin +@@ -641,7 +640,7 @@ fi + if [ -x /sysroot$init ] ; then + + # Leave initramfs and transition to rootfs +- kill `pidof udevd` ++ killall udevd + if [ "$quiet" != "1" ] ; then + echo "transfering control to $init" + fi | ||
[-] [+] | Added | timeout-fix.patch ^ |
@@ -0,0 +1,20 @@ +--- mkinitrd-7.0.17/mkmrstinitrd~ 2010-02-08 09:59:11.000000000 -0500 ++++ mkinitrd-7.0.17/mkmrstinitrd 2010-06-11 22:52:48.267155400 -0400 +@@ -397,7 +397,7 @@ + if [ "$quiet" != "1" ] ; then + echo "waiting for system to settle" + fi +- /sbin/udevadm settle --timeout=30 || : ++ /sbin/udevadm settle --timeout=5 || : + + echo "Searching for Root File System..." + # Find the boot disk +@@ -502,7 +502,7 @@ + if [ "$quiet" != "1" ] ; then + echo "waiting for system to settle" + fi +- /sbin/udevadm settle --timeout=30 || : ++ /sbin/udevadm settle --timeout=5 || : + fi + + | ||
Added | mkinitrd-7.0.17.tar.bz2 ^ |
Submit package nemo:deve...ap3:n900 / n900-camera-firmware (revision 1) to package nemo:test...ap3:n900 / n900-camera-firmware
[-] [+] | Added | n900-camera-firmware.changes |
[-] [+] | Added | n900-camera-firmware.spec ^ |
Added | n900-camera-firmware_0.0.26.tar.bz2 ^ |
Submit package nemo:devel...map3:n900 / nokia-n900-configs (revision 2) to package nemo:testi...map3:n900 / nokia-n900-configs
[-] [+] | Added | nokia-n900-configs.changes |
[-] [+] | Added | nokia-n900-configs.spec ^ |
[-] [+] | Added | 10-n900-swap ^ |
@@ -0,0 +1,13 @@ +#!/bin/sh + +grep mmcblk1p3 /etc/fstab > /dev/null +RETVAL=`echo $?` + +if [ "0" -eq "$RETVAL" ]; then + exit 0 +fi + +echo "/dev/mmcblk1p3 swap swap defaults,noatime 0 0" >> /etc/fstab + +swapon -a + | ||
[-] [+] | Added | 60-nemo-mobile-hw.conf ^ |
@@ -0,0 +1,5 @@ +# Set QT_USE_DRAG_DISTANCE environment variable +# The variable defines default value for QApplication's +# startDragDistance property +QT_USE_DRAG_DISTANCE=12 + | ||
[-] [+] | Added | nokia-n900-configs.service ^ |
@@ -0,0 +1,11 @@ +[Unit] +Description=Nokia N900 Configs + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/sbin/nokia-n900-configs.sh start +ExecStop=/usr/sbin/nokia-n900-configs.sh stop + +[Install] +WantedBy=multi-user.target | ||
[-] [+] | Added | nokia-n900-configs.sh ^ |
@@ -0,0 +1,70 @@ +#!/bin/bash + +# Set up GPIO lines for N900 modem and other N900 setup items +# Authors: Kai Vehmanen, Marko Saukko, Kalle Jokiniemi. + +function setup_gpio +{ + # set up the GPIO's for N900 modem: + echo 70 >/sys/class/gpio/export + echo low >/sys/class/gpio/gpio70/direction + echo 0 >/sys/class/gpio/gpio70/value + echo 73 >/sys/class/gpio/export + echo high >/sys/class/gpio/gpio73/direction + echo 0 >/sys/class/gpio/gpio73/value + echo 74 >/sys/class/gpio/export + echo low >/sys/class/gpio/gpio74/direction + echo 75 >/sys/class/gpio/export + echo low >/sys/class/gpio/gpio75/direction + echo 157 >/sys/class/gpio/export + echo low >/sys/class/gpio/gpio157/direction + echo 0 >/sys/class/gpio/gpio157/value + # create symlinks for ofono N900 plugin + mkdir -p /dev/cmt + ln -nsf /sys/class/gpio/gpio70 /dev/cmt/cmt_apeslpx + ln -nsf /sys/class/gpio/gpio74 /dev/cmt/cmt_en + ln -nsf /sys/class/gpio/gpio73 /dev/cmt/cmt_rst_rq + ln -nsf /sys/class/gpio/gpio75 /dev/cmt/cmt_rst + ln -nsf /sys/class/gpio/gpio157 /dev/cmt/cmt_bsi +} + +function setup_keymap +{ + /bin/loadkeys /lib/kbd/keymaps/arm/qwerty/nokia-n900.map +} + +function setup_pm +{ + if [ $1 -ne 0 ]; then + UART_SLEEP=15 + else + UART_SLEEP=0 + fi + + echo $UART_SLEEP > /sys/class/tty/ttyO0/device/sleep_timeout + echo $UART_SLEEP > /sys/class/tty/ttyO1/device/sleep_timeout + echo $UART_SLEEP > /sys/class/tty/ttyO2/device/sleep_timeout + + echo $1 > /sys/kernel/debug/pm_debug/sleep_while_idle +} + + +case "$1" in + start) + echo "Setting up GPIO lines for N900 modem" + setup_gpio + echo "Setting up PM" + setup_pm 1 + echo "Setting up keymap" + setup_keymap || echo ".. failed" + ;; + stop) + echo "Stopping PM" + setup_pm 0 + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 +esac + +exit 0 | ||
[-] [+] | Added | nokia-n900-configs.yaml ^ |
@@ -0,0 +1,29 @@ +Name: nokia-n900-configs +Summary: Provides configs for Nokia N900 +Version: 0.7.6 +Release: 1 +Group: System/Device Mode Adaptation +License: GPLv2 +Sources: + - nokia-n900-input-rules.conf + - nokia-n900-keys.map + - "%{name}.sh" + - pipelines.conf + - "%{name}.service" + - 60-nemo-mobile-hw.conf + - 10-n900-swap + +Description: Provides configs for Nokia N900 device. + +Requires: + # Required by nokia-n900-setup.init + - kbd + - oneshot + +PkgBR: + - oneshot + +Configure: none +Builder: none +NoSetup: yes +ExclusiveArch: "%{arm}" | ||
[-] [+] | Added | nokia-n900-input-rules.conf ^ |
@@ -0,0 +1,24 @@ +Section "InputClass" + Identifier "Touchscreen" + MatchProduct "TSC2005 touchscreen" + Option "Calibration" "200 3910 3761 180" + Option "SendCoreEvents" "On" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "Keyboard" + MatchProduct "TWL4030 Keypad|gpio-keys" + Option "XkbModel" "nokiarx51" + Option "CoreKeyboard" "On" + Option "XkbLayout" "us" + Option "XkbOptions" "grp:ctrl_shift_toggle" + Option "XkbVariant" ",qwerty" + Driver "evdev" +EndSection + +Section "InputClass" + Identifier "disable accelerometer" + MatchProduct "Accelerometer" + Option "Ignore" "on" +EndSection | ||
[-] [+] | Added | nokia-n900-keys.map ^ |
@@ -0,0 +1,69 @@ +keymaps 0-2,4 +# +keycode 14 = Delete +keycode 16 = q + altgr keycode 16 = one +keycode 17 = w + altgr keycode 17 = two +keycode 18 = e + altgr keycode 18 = three +keycode 19 = r + altgr keycode 19 = four +keycode 20 = t + altgr keycode 20 = five +keycode 21 = y + altgr keycode 21 = six +keycode 22 = u + altgr keycode 22 = seven +keycode 23 = i + altgr keycode 23 = eight +keycode 24 = o + altgr keycode 24 = nine +keycode 25 = p + altgr keycode 25 = zero +keycode 28 = Return +keycode 29 = Control + altgr keycode 29 = Escape +keycode 30 = a + altgr keycode 30 = asterisk +keycode 31 = s + altgr keycode 31 = plus +keycode 32 = d + altgr keycode 32 = numbersign +keycode 33 = f + altgr keycode 33 = minus +keycode 34 = g + altgr keycode 34 = underscore +keycode 35 = h + altgr keycode 35 = parenleft +keycode 36 = j + altgr keycode 36 = parenright +keycode 37 = k + altgr keycode 37 = ampersand +keycode 38 = l + altgr keycode 38 = exclam +keycode 42 = Shift +keycode 44 = z + altgr keycode 44 = bar +keycode 45 = x + altgr keycode 45 = dollar +keycode 46 = c + altgr keycode 46 = percent +keycode 47 = v + altgr keycode 47 = slash +keycode 48 = b + altgr keycode 48 = backslash +keycode 49 = n + altgr keycode 49 = quotedbl +keycode 50 = m + altgr keycode 50 = apostrophe +keycode 51 = comma semicolon equal +keycode 52 = period colon question +keycode 57 = space Tab at +keycode 100 = AltGr +keycode 103 = Up +keycode 105 = Left + altgr keycode 105 = less +keycode 106 = Right + altgr keycode 106 = greater +keycode 108 = Down | ||
[-] [+] | Added | pipelines.conf ^ |
@@ -0,0 +1,65 @@ +# +# ISP pipeline configuration file for subdevsrc and mcsrc elements. +# +# Recognized settings: +# "max_resizer_factor:" defines resizer's max scaling factor (type: float) +# "width_modulo:" tells how preview/capture width should be rounded (type: int) +# "height_modulo:" tells how preview/capture height should be rounded (type: int) +# "primary:" defines the primary camera device pipeline +# "primary_continuous:" defines the primary camera pipeline for continuous shooting +# "secondary:" defines secondary camera device pipeline +# +# Pipeline definition utilities: +# "OUT_FORMAT" is mapped to output color format selected by application +# "OUT_SIZE" is mapped to output resolution +# "V4L2_MBUS_FMT_*" forces the color format +# "POOL" connects two pipeline segments together with a buffer pool +# "CAPTUREPOOL" works like POOL and is used for continuous shooting pipelines +# +# Each pipeline definition should start with sensor entity and end to video output node. +# The separator character used in pipeline declarations is exclamation mark (!). +# Pipeline definitions *must* also contain "OUT_FORMAT" keyword, since that is used for +# determining the entity where output pixel formats should be queried. +# +# When pipeline definition contains a mem-to-mem segment, it must be connected by +# using a POOL. Mem-to-mem segment means a pipeline section where frames are read +# out from pipeline through an "output" entity and pushed back to ISP pipeline by using +# an "input" entity. POOL must be always present between output and input entities to +# ensure a proper buffer passing service between them. +# +# Continuous shooting pipeline must contain a CAPTUREPOOL definition. It defines the +# pool which is used for image capturing in continuous shooting mode. +# +# The encoding of this file must be ISO-8859-1. + +# Keyword mappings. These are used to simplify pipeline definitions and +# to automate sensor selection. When multiple entries are found with same keyword, +# subdevsrc will try them one after another, until functional entity is found. + +main = et8ek8 +vga = smia-sensor +csi2 = OMAP3 ISP CSI2a +csi2_out = OMAP3 ISP CSI2a output +ccp2 = OMAP3 ISP CCP2 +ccp2_in = OMAP3 ISP CCP2 input +ccdc = OMAP3 ISP CCDC +prev = OMAP3 ISP preview +prev_out = OMAP3 ISP preview output +rsz_in = OMAP3 ISP resizer input +rsz = OMAP3 ISP resizer +rsz_out = OMAP3 ISP resizer output + +# Settings +max_resizer_factor: 4.0 +width_modulo: 16 +height_modulo: 16 + +# Primary camera pipeline +primary: main ! ccp2 ! V4L2_MBUS_FMT_SGRBG10_1X10 ! ccdc ! prev ! OUT_FORMAT ! rsz ! OUT_SIZE ! rsz_out + +# Primary camera pipeline for continuous shooting +primary_continuous: main ! ccp2 ! V4L2_MBUS_FMT_SGRBG10_1X10 ! ccdc ! prev ! OUT_FORMAT ! prev_out ! CAPTUREPOOL ! rsz_in ! rsz ! OUT_SIZE ! rsz_out +#primary_continuous: main ! csi2 ! V4L2_MBUS_FMT_SGRBG10_1X10 ! csi2_out ! POOL ! ccp2_in ! ccp2 ! ccdc ! prev ! OUT_FORMAT ! prev_out ! CAPTUREPOOL ! rsz_in ! rsz ! OUT_SIZE ! rsz_out + +# Secondary camera pipeline +secondary: vga ! ccp2 ! ccdc ! prev ! OUT_FORMAT ! rsz ! OUT_SIZE ! rsz_out |
Submit package nemo:deve...ap3:n900 / nokia-usb-networking (revision 1) to package nemo:test...ap3:n900 / nokia-usb-networking
[-] [+] | Added | nokia-usb-networking.changes |
[-] [+] | Added | nokia-usb-networking.spec ^ |
[-] [+] | Added | nokia-usb-networking.service ^ |
@@ -0,0 +1,11 @@ +[Unit] +Description=Nokia USB Networking + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/sbin/nokia-usb-networking.sh start +ExecStop=/usr/sbin/nokia-usb-networking.sh stop + +[Install] +WantedBy=multi-user.target | ||
[-] [+] | Added | nokia-usb-networking.sh ^ |
@@ -0,0 +1,42 @@ +#!/bin/bash + +# Nokia USB Networking + +RETVAL=0 +USB_NET_MODULE=g_nokia + +function start { + /sbin/modprobe $USB_NET_MODULE + RETVAL=$? + if [ "$RETVAL" = 0 ]; then + ifconfig usb0 down + ifconfig usb0 192.168.2.15 up + RETVAL=$? + fi +} + +function stop { + lsmod | grep $USB_NET_MODULE &> /dev/null + RETVAL=$? + if [ "$RETVAL" = 0 ]; then + /sbin/ifconfig usb0 down + /sbin/modprobe -r $USB_NET_MODULE + $RETVAL=$? + else + $RETVAL=0 + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + *) + echo "Usage: $0 {start|stop}" + RETVAL=1 +esac + +exit $RETVAL | ||
[-] [+] | Added | nokia-usb-networking.yaml ^ |
@@ -0,0 +1,21 @@ +Name: nokia-usb-networking +Summary: Provides init script for USB networking for Nokia devices +Version: 2.0 +Release: 0 +Group: System/Startup Services +License: GPLv2 +URL: http://gitorious.org/meego-device-adaptation/n900_nokia-usb-networking/ +Sources: + - "%{name}.sh" + - "%{name}.service" +Description: Provides init script for USB networking for Nokia devices. + +Requires: + - net-tools + - kmod >= 9 + +NoSetup: yes +Configure: none +Builder: none +BuildArch: noarch + |
Submit package nemo:devel:hw:ti:omap3:n900 / pattern-n900 to package nemo:testing:...i:omap3:n900 / pattern-n900
[-] [+] | Added | pattern-n900.changes |
[-] [+] | Added | pattern-n900.spec ^ |
Added | pattern-n900-005.tar.bz2 ^ | |
[-] [+] | Added | pattern-n900.yaml ^ |
@@ -0,0 +1,21 @@ +Name: pattern-n900 +Summary: Provides pattern '%{name}' +Description: | + %{summary}. +Version: 005 +Release: 1 +Group: Packaging/Patterns +License: GPLv2 +URL: https://gitorious.org/meego-developer-edition-for-n900/package-groups +Sources: + - "%{name}-%{version}.tar.bz2" +Provides: + - package-groups +PkgBR: + - repomd-pattern-builder +Builder: make +Configure: none +BuildArch: noarch +Files: + - "%{_datadir}/package-groups/*.xml" + |
Submit package nemo:devel:hw:ti:omap3:n900 / patterns-n900 (revision 1) to package nemo:testing...i:omap3:n900 / patterns-n900
[-] [+] | Added | patterns-n900.changes |
[-] [+] | Added | patterns-n900.spec ^ |
Added | patterns-n900-0.1.tar.bz2 ^ |
Submit package nemo:deve...ap3:n900 / policy-se...sic-n900 (revision 1) to package nemo:test...ap3:n900 / policy-se...sic-n900
[-] [+] | Added | policy-settings-basic-n900.changes |
[-] [+] | Added | policy-settings-basic-n900.spec ^ |
[-] [+] | Added | add-missing-accessory-incompatible.patch ^ |
@@ -0,0 +1,88 @@ +From b8dce65d2b41cacb102bd2b9025dfceedf4af7cf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <juho.hamalainen@tieto.com> +Date: Thu, 16 Aug 2012 16:43:02 +0300 +Subject: [PATCH 2/2] Add missing accessory 'incompatible'. Fixes NEMO#332 + +--- + basic/policy/audio_route_rules.pl | 2 ++ + basic/policy/hwconfig.pl | 5 +++++ + basic/policy/policy.dres | 2 ++ + 3 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/basic/policy/audio_route_rules.pl b/basic/policy/audio_route_rules.pl +index 0c33638..b9744b8 100644 +--- a/basic/policy/audio_route_rules.pl ++++ b/basic/policy/audio_route_rules.pl +@@ -115,3 +115,5 @@ invalid_audio_device_choice(_, source, tvoutandbthsp) :- + + invalid_audio_device_choice(_, source, headset) :- + not(audio_route:get_route(sink, headset)). ++ ++invalid_audio_device_choice(_, _, incompatible). +diff --git a/basic/policy/hwconfig.pl b/basic/policy/hwconfig.pl +index 66fabca..1720ad2 100644 +--- a/basic/policy/hwconfig.pl ++++ b/basic/policy/hwconfig.pl +@@ -5,6 +5,7 @@ video_device(tvout). + audio_device_type(sink). + audio_device_type(source). + ++audio_device(incompatible). + audio_device(tvoutandbta2dp). + audio_device(tvoutandbthsp). + audio_device(ihfandbthsp). +@@ -26,6 +27,7 @@ audio_device(ihf). + audio_device(null). + + ++audio_device_type(sink , incompatible). + audio_device_type(sink , tvoutandbta2dp). + audio_device_type(sink , tvoutandbthsp). + audio_device_type(sink , ihfandbthsp). +@@ -49,6 +51,7 @@ audio_device_type(source, headset). + audio_device_type(source, headmike). + audio_device_type(source, microphone). + ++audio_device_privavy(private, incompatible). + audio_device_privacy(private, tvoutandbta2dp). + audio_device_privacy(private, tvoutandbthsp). + audio_device_privacy(private, ihfandbthsp). +@@ -69,6 +72,7 @@ audio_device_privacy(private, microphone). + audio_device_privacy(public , microphone). + audio_device_privacy(private, headmike). + ++accessory(incompatible). + accessory(bta2dp). + accessory(bthsp). + accessory(headset). +@@ -79,6 +83,7 @@ accessory(hac). + + video_accessory(tvout). + ++audio_accessory(incompatible). + audio_accessory(bta2dp). + audio_accessory(bthsp). + audio_accessory(headset). +diff --git a/basic/policy/policy.dres b/basic/policy/policy.dres +index e7e507d..02adeab 100644 +--- a/basic/policy/policy.dres ++++ b/basic/policy/policy.dres +@@ -57,6 +57,7 @@ $audio_device_accessible += { name: headphone , driver: 1, connected: 0 } + $audio_device_accessible += { name: headset , driver: 1, connected: 0 } + $audio_device_accessible += { name: bthsp , driver: 0, connected: 0 } + $audio_device_accessible += { name: bta2dp , driver: 0, connected: 0 } ++$audio_device_accessible += { name: incompatible , driver: 0, connected: 0 } + + $audio_device_selectable = { name: null , selectable: 1 } + $audio_device_selectable += { name: ihf , selectable: 1 } +@@ -77,6 +78,7 @@ $audio_device_selectable += { name: ihfandheadphone , selectable: 0 } + $audio_device_selectable += { name: ihfandbthsp , selectable: 0 } + $audio_device_selectable += { name: tvoutandbthsp , selectable: 0 } + $audio_device_selectable += { name: tvoutandbta2dp , selectable: 0 } ++$audio_device_selectable += { name: incompatible , selectable: 0 } + + + # audio modes for ECI detection +-- +1.7.0.4 + | ||
[-] [+] | Added | add-missing-resource_class_request-4.patch ^ |
@@ -0,0 +1,51 @@ +From 8a1b708321b1700ff2cae4ca61f9c4451b0e893e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <juho.hamalainen@tieto.com> +Date: Thu, 16 Aug 2012 16:42:41 +0300 +Subject: [PATCH 1/2] Add missing resource_class_request/4. Fixes NEMO#257 + +--- + basic/policy/resource.pl | 22 ++++++++++++++++++++-- + 1 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/basic/policy/resource.pl b/basic/policy/resource.pl +index 53db90d..e2b57fd 100644 +--- a/basic/policy/resource.pl ++++ b/basic/policy/resource.pl +@@ -2,10 +2,10 @@ + [update_resource_entries/1, update_resource_owner_entries/1, + resource_owner/2, resource_owner/3, resource_group/2, + granted_resource/2, granted_resource/3, active_resource/3, +- force_resource_release/3]). ++ force_resource_release/3, resource_class_request/4]). + + rules([update_resource_entries/1, update_resource_owner_entries/1, +- force_resource_release/3]). ++ force_resource_release/3, resource_class_request/4]). + + + /* +@@ -447,3 +447,21 @@ active_resource(Class, Group, Resource) :- + GrantedBit is Granted /\ ResourceBit, + GrantedBit = ResourceBit, + !. ++ ++resource_bits([], A, A). ++resource_bits([A|C], B, E) :- ++ D is A\/B, ++ resource_bits(C, D, E). ++ ++resource_bits_list(C, D) :- ++ findall(A, ++ (resource_classes:resource_bit(B, A), ++ resource_classes:valid_resource_class(B, C)), ++ D). ++ ++resource_class_request(Class, M, O, Result) :- ++ resource_bits_list(Class, BitList), ++ resource_bits(BitList, 0, BitMask), ++ Mandatory is M/\BitMask, ++ Optional is O/\BitMask, ++ Result=[[resource, [mandatory, Mandatory], [optional, Optional]]]. +-- +1.7.0.4 + | ||
[-] [+] | Added | add-missing-snap_button-resource-class-mapping.patch ^ |
@@ -0,0 +1,32 @@ +From db27ba146e89a53818c78812a7fcc2f52e5ab5fe Mon Sep 17 00:00:00 2001 +From: Antoine Reversat <a.reversat@gmail.com> +Date: Tue, 21 Aug 2012 20:37:09 -0400 +Subject: [PATCH] Add missing snap_button resource/class mapping + +--- + basic/policy/resource_classes.pl | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/basic/policy/resource_classes.pl b/basic/policy/resource_classes.pl +index 9ec26fe..e0ed5ed 100644 +--- a/basic/policy/resource_classes.pl ++++ b/basic/policy/resource_classes.pl +@@ -235,3 +235,15 @@ valid_resource_class( headset_buttons , implicit ). + valid_resource_class( headset_buttons , event ). + valid_resource_class( headset_buttons , background ). + valid_resource_class( headset_buttons , nobody ). ++ ++valid_resource_class( snap_button , navigator ). ++valid_resource_class( snap_button , call ). ++valid_resource_class( snap_button , camera ). ++valid_resource_class( snap_button , ringtone ). ++valid_resource_class( snap_button , alarm ). ++valid_resource_class( snap_button , game ). ++valid_resource_class( snap_button , player ). ++valid_resource_class( snap_button , implicit ). ++valid_resource_class( snap_button , event ). ++valid_resource_class( snap_button , background ). ++valid_resource_class( snap_button , nobody ). +-- +1.7.9.5 + | ||
Added | policy-settings-basic-n900-0.1.1.tar.gz ^ | |
[-] [+] | Added | policy-settings-basic-n900.yaml ^ |
@@ -0,0 +1,54 @@ +Name: policy-settings-basic-n900 +Summary: Precompiled basic MeeGo policy settings for the N900 +Version: 0.1.1 +Release: 0 +Group: System/Resource Policy +License: GPLv2 +Sources: + - "%{name}-%{version}.tar.gz" +Description: Precompiled basic MeeGo policy settings for the N900. + +Patches: + - add-missing-resource_class_request-4.patch + - add-missing-accessory-incompatible.patch + - add-missing-snap_button-resource-class-mapping.patch +Requires: + - ohm + - ohm-plugins-misc + - ohm-plugin-resolver + - ohm-plugin-ruleengine + - ohm-plugin-videoep + - ohm-plugin-fmradio + - ohm-plugin-dspep + - ohm-plugins-dbus + - ohm-plugin-telephony + - ohm-plugin-media + - ohm-plugin-accessories + - pulseaudio-policy-enforcement +PkgBR: + - libdres-utils + - swi-prolog + - swi-prolog-library + - libprolog + - prolog-resourcepolicy-extensions +Provides: + - policy-settings +Configure: autogen +Builder: none +BuildArch: noarch +SubPackages: + - Name: text + Summary: Basic MeeGo policy settings sources for the N900 + Group: System/Resource Policy + Description: Basic MeeGo policy settings sources for the N900. + AutoDepend: false + Requires: + - swi-prolog-library + - ohm + - ohm-plugins-misc + - ohm-plugin-resolver + - ohm-plugin-ruleengine + - pulseaudio-policy-enforcement + Provides: + - policy-settings + |
Submit package nemo:deve...ap3:n900 / pulseaudi...ngs-n900 (revision 1) to package nemo:test...ap3:n900 / pulseaudi...ngs-n900
[-] [+] | Added | pulseaudio-settings-n900.changes |
[-] [+] | Added | pulseaudio-settings-n900.spec ^ |
Added | pulseaudio-settings-n900-2.1.2.tar.gz ^ | |
[-] [+] | Added | pulseaudio-settings-n900.yaml ^ |
@@ -0,0 +1,34 @@ +Name: pulseaudio-settings-n900 +Summary: PulseAudio settings for Nokia N900 +Version: 2.1.2 +Release: 1 +Group: System/Libraries +License: GPLv2 +URL: https://github.com/nemomobile/pulseaudio-settings-n900 +Description: | + PulseAudio settings for Nokia N900 +BuildArch: noarch + +Sources: + - "%{name}-%{version}.tar.gz" + +Configure: none +Builder: none + +Requires: + - pulseaudio >= 2.1 + - pulseaudio-modules-nemo-music >= 2.1.3 + - pulseaudio-modules-nemo-record >= 2.1.3 + - pulseaudio-modules-nemo-stream-restore >= 2.1.3 + - pulseaudio-modules-nemo-voice >= 2.1.3 + - pulseaudio-module-cmtspeech-n9xx >= 2.1.3 + - pulseaudio-policy-enforcement + +# The closed Nokia modules are not compatible with pulseaudio 2.1. Obsoleting +# them here in the settings package should make the upgrade from 0.9.22 to 2.1 +# go smoothly without complaints from the package manager. +Obsoletes: + - pulseaudio-modules-nokia-common-bin + - pulseaudio-modules-nokia-algorithms-bin + - pulseaudio-modules-nokia-audiots-bin + - pulseaudio-modules-nokia-parameters-bin |
Submit package nemo:devel:hw:ti:omap3:n900 / sysinfod-rx51 (revision 1) to package nemo:testing...i:omap3:n900 / sysinfod-rx51
[-] [+] | Added | sysinfod-rx51.changes |
[-] [+] | Added | sysinfod-rx51.spec ^ |
Added | libsysinfo-bin-0~20100226.1-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + | ||
Added | sysinfod-bin-0~20100226.1-armv7hl.tar.bz2 ^ | |
Added | sysinfod-common-bin-0~20100226.1-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | sysinfod-rx51-bt-addr.sh ^ |
@@ -0,0 +1,19 @@ +#!/bin/sh + +while ! dbus-send --system --reply-timeout=10 --dest=org.freedesktop.DBus /org/freedesktop/DBus/GetId org.freedesktop.DBus.GetId ; do sleep 1; done + +btaddr=`sysinfo-tool -g /certs/npc/esn/bt_id` + +bt0=`expr substr $btaddr 1 2` +bt1=`expr substr $btaddr 3 2` +bt2=`expr substr $btaddr 5 2` +bt3=`expr substr $btaddr 7 2` +bt4=`expr substr $btaddr 9 2` +bt5=`expr substr $btaddr 11 2` + +btaddr=$bt0:$bt1:$bt2:$bt3:$bt4:$bt5 + +echo $btaddr >/sys/devices/platform/hci_h4p/bdaddr + + + | ||
[-] [+] | Added | sysinfod-rx51-bt-dbus.sh ^ |
@@ -0,0 +1,2 @@ +#!/bin/sh +/lib/udev/sysinfod-rx51-bt-addr.sh & | ||
[-] [+] | Added | sysinfod-rx51.rules ^ |
@@ -0,0 +1,5 @@ +# Following line is commented as it matches to every bdaddr out there. Should be +# fixed by adding KERNEL== specification in the line below. +# SUBSYSTEM=="platform",ATTRS{bdaddr}=="00:00:00:00:00:00",WAIT_FOR="bdaddr",RUN+="sysinfod-rx51-bt-dbus.sh" + + | ||
[-] [+] | Added | sysinfod-rx51.yaml ^ |
@@ -0,0 +1,94 @@ +Name: sysinfod-rx51 +Summary: System information daemon binaries +Version: 0~20100226.1 +Release: 0 +Group: System/Startup Services +License: Nokia Proprietary +Sources: + - "sysinfod-bin-%{version}-armv7hl.tar.bz2" + - "sysinfod-common-bin-%{version}-armv7hl.tar.bz2" + - "sysinfod-tool-bin-%{version}-armv7hl.tar.bz2" + - "libsysinfo-bin-%{version}-armv7hl.tar.bz2" + - "license.txt" + - "sysinfod-rx51.rules" + - "sysinfod-rx51-bt-dbus.sh" + - "sysinfod-rx51-bt-addr.sh" + +Description: D-BUS service which provides system information. +ExclusiveArch: "%arm" + +NoSetup: yes +Configure: none +Builder: none +NoFiles: yes + +SubPackages: + - Name: bin + Summary: System information daemon binaries + Group: System/Startup Services + Description: D-BUS service which provides system information. + Requires: + - sysinfod-common = %{version} + Provides: + - sysinfod + - "%{name}" + Files: + - "%doc license.txt" + - "%{_sbindir}/sysinfod" + - "%config %{_datadir}/dbus-1/system-services/com.nokia.SystemInfo.service" + - "%config %{_sysconfdir}/dbus-1/system.d/com.nokia.SystemInfo.conf" + + + - Name: common-bin + Summary: System information daemon binaries, common files + Group: System/Startup Services + Description: D-BUS service which provides system information. + Requires: + - libsysinfo = %{version} + Provides: + - sysinfod-common + - "%{name}-common" + Files: + - "%doc license.txt" + - "%config %{_sysconfdir}/sysinfod.conf" + + + - Name: tool-bin + Summary: System information daemon client + Group: System/Startup Services + Description: D-BUS service which provides system information. This is a command line utility to query the daemon + Requires: + - sysinfod = %{version} + Provides: + - sysinfod-tool + - "%{name}-tool" + Files: + - "%doc license.txt" + - "%{_bindir}/sysinfo-tool" + + + - Name: libsysinfo-rx51-bin + AsWholeName: yes + Summary: System information daemon library + Group: System/Startup Services + Description: D-BUS service which provides system information. This is a library to access system information. + Requires: + - sysinfod-common = %{version} + Provides: + - libsysinfo + - libsysinfo-rx51 + Files: + - "%doc license.txt" + - "%{_libdir}/libsysinfo.so.0" + + + - Name: udev-rules + Summary: Udev rules using sysinfod + Group: System/Startup Services + Description: This package contains the udev rules/scripts that utilize sysinfod + Requires: + - sysinfod-tool + Files: + - "/lib/udev/sysinfod-rx51-bt-dbus.sh" + - "/lib/udev/sysinfod-rx51-bt-addr.sh" + - "%config %{_sysconfdir}/udev/rules.d/sysinfod-rx51.rules" | ||
Added | sysinfod-tool-bin-0~20100226.1-armv7hl.tar.bz2 ^ |
Submit package nemo:devel...map3:n900 / ti-wl1251-firmware (revision 1) to package nemo:testi...map3:n900 / ti-wl1251-firmware
[-] [+] | Added | ti-wl1251-firmware.changes |
[-] [+] | Added | ti-wl1251-firmware.spec ^ |
Added | license.doc ^ | |
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,40 @@ +TILAW-#236402v3 + +Texas Instruments Incorporated +Technology and Software Publicly Available +Software (Object Code) License Agreement + + +Important – Please read the following license agreement carefully. This is a legally binding agreement. Do not download the Licensed Materials unless: (1) you are authorized to accept and agree to the terms of this license agreement and (2) you intend to enter into and to be bound by the terms of this agreement. + +This Software License Agreement (“Agreement”) is a legal agreement between you (either an individual or entity) and Texas Instruments Incorporated (“TI”). The “Licensed Materials” subject to this Agreement include, in whole or in part, the software programs that accompany this Agreement and any “on-line” or electronic documentation associated with these programs. By installing, copying or otherwise using the Licensed Materials you agree to abide by the terms of this Agreement. If you choose not to accept or agree with these terms, do not download or install the Licensed Materials. + + +1.Object Code License. TI hereby grants to you a limited, non-exclusive license to reproduce and use the Licensed Materials provided to you in object code format and to distribute an unlimited number of object or executable copies of such Licensed Materials, provided that such object or executable copies are used solely and exclusively on devices manufactured by or for TI. + +2.Termination. This license is effective until terminated. Without prejudice to any other rights, TI may terminate your right to use the Licensed Materials under this Agreement if you fail to comply with the terms of this Agreement. In such event, you shall destroy all copies of the Licensed Materials, including all portions and derivatives thereof. + +3.Intellectual Property Rights. The Licensed Materials being provided to you hereunder are being made publicly available by TI, even though they contain copyrighted material of TI and its licensors, if applicable. In no event may you alter, remove or destroy any copyright notice included in the Licensed Materials. To the extent that any of the Licensed Materials are provided in binary or object code only, you may not unlock, decompile, reverse engineer, disassemble or otherwise translate such binary or object code to human-perceivable form. The source code of such reverse engineered code may contain TI trade secret and other proprietary information. Further, nothing shall obligate TI to provide you with source code for the Licensed Materials licensed to you in binary or object code only under this Agreement. TI reserves all rights not specifically granted under this Agreement. + +4.Warranties and Limitations. THE LICENSED MATERIALS ARE PROVIDED “AS IS”. TI MAKES NO WARRANTY OR REPRESENTATION, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS AND LACK OF NEGLIGENCE. TI DISCLAIMS ANY WARRANTY OF TITLE, QUIET ENJOYMENT, QUIET POSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO THE LICENSED MATERIALS OR USE OF THOSE MATERIALS. + +YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS MAY NOT BE INTENDED FOR PRODUCTION APPLICATIONS AND MAY CONTAIN IRREGULARITIES AND DEFECTS NOT FOUND IN PRODUCTION SOFTWARE. FURTHERMORE, YOU ACKNOWLEDGE AND AGREE THAT THE LICENSED MATERIALS HAVE NOT BEEN TESTED OR CERTIFIED BY ANY GOVERNMENT AGENCY OR INDUSTRY REGULATORY ORGANIZATION OR ANY OTHER THIRD PARTY ORGANIZATION. YOU AGREE THAT PRIOR TO USING, INCORPORATING OR DISTRIBUTING THE LICENSED MATERIALS IN OR WITH ANY COMMERCIAL PRODUCT THAT YOU WILL THOROUGHLY TEST THE PRODUCT AND THE FUNCTIONALITY OF THE LICENSED MATERIALS IN OR WITH THAT PRODUCT AND BE SOLELY RESPONSIBLE FOR ANY PROBLEMS OR FAILURES. + +IN NO EVENT SHALL TI, OR ANY APPLICABLE LICENSOR, BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, HOWEVER CAUSED ON ANY THEORY OF LIABILITY, ARISING IN ANY WAY OUT OF THIS AGREEMENT, OR YOUR USE OF THE LICENSED MATERIALS, WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. EXCLUDED DAMAGES INCLUDE, BUT ARE NOT LIMITED TO, COST OF REMOVAL OR REINSTALLATION, OUTSIDE COMPUTER TIME, LABOR COSTS, LOSS OR CORRUPTION OF DATA, LOSS OF GOODWILL, LOSS OF PROFITS, LOSS OF SAVINGS, OR LOSS OF USE OR INTERRUPTION OF BUSINESS OR ANY OTHER ECONOMIC LOSS. IN NO EVENT WILL TI’S AGGREGATE LIABILITY UNDER THIS AGREEMENT OR ARISING OUT OF YOUR USE OF THE LICENSED MATERIALS EXCEED FIVE HUNDRED U.S. DOLLARS (US$500). + +Because some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages or limitation on how long an implied warranty lasts, the above limitations or exclusions may not apply to you. + +5.Export Control. The software programs and any “on-line” documentation as well as any updates or upgrades to such software programs or documentation may be subject to the export or import regulations of certain countries. You agree to comply with all such regulations and acknowledge that you have the responsibility to obtain any licenses or other authorizations that may be required to export, re-export or import the Licensed Materials. + +6.Governing Law, Jurisdiction and Severability. This Agreement will be governed by and interpreted in accordance with the laws of the State of Texas, without reference to that state’s conflict of laws principles. This Agreement shall not be governed by the United Nations Convention on Contracts for the International Sale of Goods, nor shall it be governed by the Uniform Computer Information Transactions Act (UCITA). Any dispute arising out of or related to this Agreement will be brought in, and each party consents to the exclusive jurisdiction and venue in the state and federal courts sitting in Dallas Country, Texas. Each party waives all defenses of lack of personal jurisdiction and forum non-conveniens and agrees that process may be served on either party in a manner authorized by applicable law or court rule. If for any reason a court of competent jurisdiction finds any provision of the Agreement to be unenforceable, that provision will be enforced to the maximum extent possible to effectuate the intent of the parties and the remainder of the Agreement shall continue in full force and effect. + +7.PRC Provisions. If you are located in the People’s Republic of China (“PRC”) or if the Licensed Materials will be sent to the PRC, the following provisions shall apply and shall supersede any other provisions in this Agreement concerning the same subject matter as the following provisions: + + a. Registration Requirements. You shall be solely responsible for performing all acts and obtaining all approvals that may be required in connection with this Agreement by the government of the PRC, including but not limited to registering pursuant to, and otherwise complying with, the PRC Measures on the Administration of Software Products, Management Regulations on Technology Import-Export, and Technology Import and Export Contract Registration Management Rules. Upon receipt of such approvals from the government authorities, you shall forward evidence of all such approvals to TI for its records. In the event that you fail to obtain any such approval or registration, you shall be solely responsible for any and all losses, damages or costs resulting therefrom, and shall indemnify TI for all such losses, damages or costs. + + b. Governing Language. This Agreement is written and executed in the English language. If a translation of this Agreement is required for any purpose, including but not limited to registration of the Agreement pursuant to any governmental laws, regulations or rules, you shall be solely responsible for creating such translation. Any translation of this Agreement into a language other than English is intended solely in order to comply with such laws or for reference purposes, and the English language version shall be authoritative and controlling. + +8.Entire Agreement. This is the entire Agreement between you and TI and supersedes any prior agreement between the parties related to the subject matter of this Agreement. No amendment or modification of this Agreement will be effective unless in writing and signed by a duly authorized representative of TI. You hereby warrant and represent that you have obtained all authorizations and other applicable consents required empowering you to enter into this Agreement. + +TILAW-#236402v3 + | ||
[-] [+] | Added | ti-wl1251-firmware.yaml ^ |
@@ -0,0 +1,14 @@ +Name: ti-wl1251-firmware +Summary: Firmware for TI wl1251 WLAN chip +Version: 0.4 +Release: 0 +Group: System/Libraries +License: TI Proprietary +Sources: + - "%{name}_%{version}.tar.bz2" + - license.txt + - license.doc +Description: This is the firmware for the TI wl1251 WLAN chip. + +Configure: none +Builder: none | ||
Added | ti-wl1251-firmware_0.4.tar.bz2 ^ |
Submit package nemo:devel:hw:ti:omap3:n900 / u-boot (revision 2) to package nemo:testing:hw:ti:omap3:n900 / u-boot
[-] [+] | Added | u-boot.changes |
[-] [+] | Added | u-boot.spec ^ |
[-] [+] | Added | 0001-ARMV7-OMAP-Add-new-mmc-driver-compatible-with-CONFIG.patch ^ |
@@ -0,0 +1,547 @@ +From e5da493f1a4ac16d1966afa45bf0b8dc22fabb01 Mon Sep 17 00:00:00 2001 +From: Sukumar Ghorai <s-ghorai@ti.com> +Date: Sat, 18 Sep 2010 20:32:33 -0700 +Subject: [PATCH 1/4] ARMV7: OMAP: Add new mmc driver compatible with CONFIG_GENERIC_MMC + +OMAP boards currently use a legacy mmc driver. This patch adds a new +mmc driver which will work with the generic mmc driver in u-boot. + +This new driver will work with both OMAP3 and OMAP4 boards. + +This patch does not remove the old driver. It should remain in the +tree until all boards that use it switch to the new driver. + +Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> +Tested-by: Steve Sakoman <steve@sakoman.com> +--- +Mainline u-boot commit ID: de94124 + + arch/arm/include/asm/arch-omap3/mmc_host_def.h | 10 + + arch/arm/include/asm/arch-omap4/mmc_host_def.h | 10 + + drivers/mmc/Makefile | 1 + + drivers/mmc/omap_hsmmc.c | 415 ++++++++++++++++++++++++ + 4 files changed, 436 insertions(+), 0 deletions(-) + create mode 100644 drivers/mmc/omap_hsmmc.c + +diff --git a/arch/arm/include/asm/arch-omap3/mmc_host_def.h b/arch/arm/include/asm/arch-omap3/mmc_host_def.h +index 43dd705..ba1c2ff 100644 +--- a/arch/arm/include/asm/arch-omap3/mmc_host_def.h ++++ b/arch/arm/include/asm/arch-omap3/mmc_host_def.h +@@ -102,12 +102,14 @@ typedef struct hsmmc { + #define NBLK_STPCNT (0x0 << 16) + #define DE_DISABLE (0x0 << 0) + #define BCE_DISABLE (0x0 << 1) ++#define BCE_ENABLE (0x1 << 1) + #define ACEN_DISABLE (0x0 << 2) + #define DDIR_OFFSET (4) + #define DDIR_MASK (0x1 << 4) + #define DDIR_WRITE (0x0 << 4) + #define DDIR_READ (0x1 << 4) + #define MSBS_SGLEBLK (0x0 << 5) ++#define MSBS_MULTIBLK (0x1 << 5) + #define RSP_TYPE_OFFSET (16) + #define RSP_TYPE_MASK (0x3 << 16) + #define RSP_TYPE_NORSP (0x0 << 16) +@@ -130,6 +132,7 @@ typedef struct hsmmc { + #define DATI_CMDDIS (0x1 << 1) + #define DTW_1_BITMODE (0x0 << 1) + #define DTW_4_BITMODE (0x1 << 1) ++#define DTW_8_BITMODE (0x1 << 5) /* CON[DW8]*/ + #define SDBP_PWROFF (0x0 << 8) + #define SDBP_PWRON (0x1 << 8) + #define SDVS_1V8 (0x5 << 9) +@@ -186,8 +189,15 @@ typedef struct { + unsigned int size; + unsigned int RCA; + } mmc_card_data; ++#define RSP_TYPE_NONE (RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK) ++#define MMC_CMD0 (INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++ ++/* Clock Configurations and Macros */ ++#define MMC_CLOCK_REFERENCE 96 /* MHz */ + + #define mmc_reg_out(addr, mask, val)\ + writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr)) + ++int omap_mmc_init(int dev_index); ++ + #endif /* MMC_HOST_DEF_H */ +diff --git a/arch/arm/include/asm/arch-omap4/mmc_host_def.h b/arch/arm/include/asm/arch-omap4/mmc_host_def.h +index e5d8b53..733d8ed 100644 +--- a/arch/arm/include/asm/arch-omap4/mmc_host_def.h ++++ b/arch/arm/include/asm/arch-omap4/mmc_host_def.h +@@ -80,12 +80,14 @@ typedef struct hsmmc { + #define NBLK_STPCNT (0x0 << 16) + #define DE_DISABLE (0x0 << 0) + #define BCE_DISABLE (0x0 << 1) ++#define BCE_ENABLE (0x1 << 1) + #define ACEN_DISABLE (0x0 << 2) + #define DDIR_OFFSET (4) + #define DDIR_MASK (0x1 << 4) + #define DDIR_WRITE (0x0 << 4) + #define DDIR_READ (0x1 << 4) + #define MSBS_SGLEBLK (0x0 << 5) ++#define MSBS_MULTIBLK (0x1 << 5) + #define RSP_TYPE_OFFSET (16) + #define RSP_TYPE_MASK (0x3 << 16) + #define RSP_TYPE_NORSP (0x0 << 16) +@@ -108,6 +110,7 @@ typedef struct hsmmc { + #define DATI_CMDDIS (0x1 << 1) + #define DTW_1_BITMODE (0x0 << 1) + #define DTW_4_BITMODE (0x1 << 1) ++#define DTW_8_BITMODE (0x1 << 5) /* CON[DW8]*/ + #define SDBP_PWROFF (0x0 << 8) + #define SDBP_PWRON (0x1 << 8) + #define SDVS_1V8 (0x5 << 9) +@@ -164,8 +167,15 @@ typedef struct { + unsigned int size; + unsigned int RCA; + } mmc_card_data; ++#define RSP_TYPE_NONE (RSP_TYPE_NORSP | CCCE_NOCHECK | CICE_NOCHECK) ++#define MMC_CMD0 (INDEX(0) | RSP_TYPE_NONE | DP_NO_DATA | DDIR_WRITE) ++ ++/* Clock Configurations and Macros */ ++#define MMC_CLOCK_REFERENCE 96 /* MHz */ + + #define mmc_reg_out(addr, mask, val)\ + writel((readl(addr) & (~(mask))) | ((val) & (mask)), (addr)) + ++int omap_mmc_init(int dev_index); ++ + #endif /* MMC_HOST_DEF_H */ +diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile +index 6603d74..2ead634 100644 +--- a/drivers/mmc/Makefile ++++ b/drivers/mmc/Makefile +@@ -32,6 +32,7 @@ COBJS-$(CONFIG_GENERIC_MMC) += mmc.o + COBJS-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o + COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o + COBJS-$(CONFIG_OMAP3_MMC) += omap3_mmc.o ++COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o + COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o + COBJS-$(CONFIG_S5P_MMC) += s5p_mmc.o + +diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c +new file mode 100644 +index 0000000..9271470 +--- /dev/null ++++ b/drivers/mmc/omap_hsmmc.c +@@ -0,0 +1,415 @@ ++/* ++ * (C) Copyright 2008 ++ * Texas Instruments, <www.ti.com> ++ * Sukumar Ghorai <s-ghorai@ti.com> ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation's version 2 of ++ * the License. ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include <config.h> ++#include <common.h> ++#include <mmc.h> ++#include <part.h> ++#include <i2c.h> ++#include <twl4030.h> ++#include <asm/io.h> ++#include <asm/arch/mmc_host_def.h> ++ ++static int mmc_read_data(hsmmc_t *mmc_base, char *buf, unsigned int size); ++static int mmc_write_data(hsmmc_t *mmc_base, const char *buf, unsigned int siz); ++static struct mmc hsmmc_dev[2]; ++unsigned char mmc_board_init(hsmmc_t *mmc_base) ++{ ++#if defined(CONFIG_TWL4030_POWER) ++ twl4030_power_mmc_init(); ++#endif ++ ++#if defined(CONFIG_OMAP34XX) ++ t2_t *t2_base = (t2_t *)T2_BASE; ++ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; ++ ++ writel(readl(&t2_base->pbias_lite) | PBIASLITEPWRDNZ1 | ++ PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0, ++ &t2_base->pbias_lite); ++ ++ writel(readl(&t2_base->devconf0) | MMCSDIO1ADPCLKISEL, ++ &t2_base->devconf0); ++ ++ writel(readl(&t2_base->devconf1) | MMCSDIO2ADPCLKISEL, ++ &t2_base->devconf1); ++ ++ writel(readl(&prcm_base->fclken1_core) | ++ EN_MMC1 | EN_MMC2 | EN_MMC3, ++ &prcm_base->fclken1_core); ++ ++ writel(readl(&prcm_base->iclken1_core) | ++ EN_MMC1 | EN_MMC2 | EN_MMC3, ++ &prcm_base->iclken1_core); ++#endif ++ ++/* TODO add appropriate OMAP4 init - none currently necessary */ ++ ++ return 0; ++} ++ | ||
[-] [+] | Added | 0002-env_mmc-Fix-broken-build-due-to-set_default_env-chan.patch ^ |
@@ -0,0 +1,31 @@ +From ec2547916b4cfc115871dd0323ad1be94d538c4a Mon Sep 17 00:00:00 2001 +From: Steve Sakoman <steve@sakoman.com> +Date: Tue, 5 Oct 2010 15:31:38 -0700 +Subject: [PATCH 2/4] env_mmc: Fix broken build due to set_default_env() change + +Previously the function was set_default_env(void), it is now +set_default_env(const char *s). This patch adds the required +parameter. This fixes a broken build on OMAP4430 SDP. + +Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org> +--- +Mainline u-boot commit id: a2f69d3 + common/env_mmc.c | 3 +-- + 1 files changed, 1 insertions(+), 2 deletions(-) + +diff --git a/common/env_mmc.c b/common/env_mmc.c +index 14203b6..cc288d4 100644 +--- a/common/env_mmc.c ++++ b/common/env_mmc.c +@@ -147,7 +147,6 @@ void env_relocate_spec(void) + #if !defined(ENV_IS_EMBEDDED) + static void use_default() + { +- puts ("*** Warning - bad CRC or MMC, using default environment\n\n"); +- set_default_env(); ++ set_default_env(NULL); + } + #endif +-- +1.6.3.3 + | ||
[-] [+] | Added | 0003-ARMV7-OMAP4-Use-generic-mmc-driver-on-Panda.patch ^ |
@@ -0,0 +1,91 @@ +From 6df569ec2f8befad99785983cbf338b5a712e071 Mon Sep 17 00:00:00 2001 +From: Sukumar Ghorai <s-ghorai@ti.com> +Date: Sat, 18 Sep 2010 20:56:18 -0700 +Subject: [PATCH 3/4] ARMV7: OMAP4: Use generic mmc driver on Panda + +This patch switches from the legacy mmc driver to the new generic mmc driver + +Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com> +Tested-by: Steve Sakoman <steve@sakoman.com> +--- +Mainline u-boot commit id: 7e982c9 + board/ti/panda/panda.c | 9 +++++++++ + include/configs/omap4_panda.h | 9 ++++----- + 2 files changed, 13 insertions(+), 5 deletions(-) + +diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c +index 1b8153b..78e1910 100644 +--- a/board/ti/panda/panda.c ++++ b/board/ti/panda/panda.c +@@ -23,6 +23,7 @@ + */ + #include <common.h> + #include <asm/arch/sys_proto.h> ++#include <asm/arch/mmc_host_def.h> + + #include "panda.h" + +@@ -87,3 +88,11 @@ void set_muxconf_regs(void) + sizeof(wkup_padconf_array) / + sizeof(struct pad_conf_entry)); + } ++ ++#ifdef CONFIG_GENERIC_MMC ++int board_mmc_init(bd_t *bis) ++{ ++ omap_mmc_init(0); ++ return 0; ++} ++#endif +diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h +index a0d27a4..8e10798 100644 +--- a/include/configs/omap4_panda.h ++++ b/include/configs/omap4_panda.h +@@ -89,7 +89,6 @@ + #define CONFIG_SYS_NS16550_COM3 UART3_BASE + + #define CONFIG_ENV_IS_NOWHERE +-#define CONFIG_ENV_OVERWRITE + #define CONFIG_BAUDRATE 115200 + #define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\ + 115200} +@@ -107,8 +106,9 @@ + #define CONFIG_TWL6030_POWER 1 + + /* MMC */ ++#define CONFIG_GENERIC_MMC 1 + #define CONFIG_MMC 1 +-#define CONFIG_OMAP3_MMC 1 ++#define CONFIG_OMAP_HSMMC 1 + #define CONFIG_SYS_MMC_SET_DEV 1 + #define CONFIG_DOS_PARTITION 1 + +@@ -155,7 +155,6 @@ + + #define CONFIG_BOOTDELAY 3 + +-/* allow overwriting serial config and ethaddr */ + #define CONFIG_ENV_OVERWRITE + + #define CONFIG_EXTRA_ENV_SETTINGS \ +@@ -163,7 +162,7 @@ + "console=ttyS2,115200n8\0" \ + "usbtty=cdc_acm\0" \ + "vram=16M\0" \ +- "mmcdev=1\0" \ ++ "mmcdev=0\0" \ + "mmcroot=/dev/mmcblk0p2 rw\0" \ + "mmcrootfstype=ext3 rootwait\0" \ + "mmcargs=setenv bootargs console=${console} " \ +@@ -179,7 +178,7 @@ + "bootm ${loadaddr}\0" \ + + #define CONFIG_BOOTCOMMAND \ +- "if mmc init ${mmcdev}; then " \ ++ "if mmc rescan ${mmcdev}; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "else " \ +-- +1.6.3.3 + | ||
[-] [+] | Added | 0004-omap4-board-change-global-data-pointer-to-file-scope.patch ^ |
@@ -0,0 +1,40 @@ +From 27708fcaa1df4baa49cd6f75efcd63fa9fa40286 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon <nm@ti.com> +Date: Mon, 25 Oct 2010 17:29:01 -0500 +Subject: [PATCH 4/4] omap4: board: change global data pointer to file scope + +DECLARE_GLOBAL_DATA_PTR is currently defined within the scope +of function while it is a global pointer. Change the scope of +definition to replicate it's global scope. This seems to help +gcc 4.5 optimizations as well. + +Signed-off-by: Nishanth Menon <nm@ti.com> +--- +posted: http://www.mail-archive.com/u-boot@lists.denx.de/msg40964.html + arch/arm/cpu/armv7/omap4/board.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/cpu/armv7/omap4/board.c b/arch/arm/cpu/armv7/omap4/board.c +index 8c1f395..a3a7273 100644 +--- a/arch/arm/cpu/armv7/omap4/board.c ++++ b/arch/arm/cpu/armv7/omap4/board.c +@@ -32,6 +32,8 @@ + #include <asm/arch/sys_proto.h> + #include <asm/sizes.h> + ++DECLARE_GLOBAL_DATA_PTR; ++ + /* + * Routine: s_init + * Description: Does early system init of muxing and clocks. +@@ -100,7 +102,6 @@ u32 sdram_size(void) + */ + int dram_init(void) + { +- DECLARE_GLOBAL_DATA_PTR; + + gd->bd->bi_dram[0].start = 0x80000000; + gd->bd->bi_dram[0].size = sdram_size(); +-- +1.6.3.3 + | ||
[-] [+] | Added | 0005-mmc-omap-timeout-counter-fix.patch ^ |
@@ -0,0 +1,235 @@ +From 082de431ce70a5b281021c844e83cc62900078ba Mon Sep 17 00:00:00 2001 +From: Nishanth Menon <nm@ti.com> +Date: Mon, 25 Oct 2010 18:09:24 -0500 +Subject: [PATCH v3] mmc: omap: timeout counter fix + +Having a loop with a counter is no timing guarentee for timing +accuracy or compiler optimizations. For e.g. the same loop counter +which runs when the MPU is running at 600MHz will timeout in around +half the time when running at 1GHz. or the example where GCC 4.5 +compiles with different optimization compared to GCC 4.4. use timer +to keep track of time elapse and we use an emperical number - 1sec +for a worst case timeout. This should never happen, and is adequate +imaginary condition for us to fail with timeout. + +Signed-off-by: Nishanth Menon <nm@ti.com> +--- +V3: changed the delay logic +posted: http://www.mail-archive.com/u-boot@lists.denx.de/msg41097.html + +V2: http://www.mail-archive.com/u-boot@lists.denx.de/msg40972.html +additional cleanups + made MAX_RETRY a macro for reuse throughout +the file. tested on PandaBoard with 1GHz boot frequency and GCC4.5 on +u-boot 2010.09 + mmc patches. Requesting testing on other platforms + +V1: http://www.mail-archive.com/u-boot@lists.denx.de/msg40969.html + + drivers/mmc/omap_hsmmc.c | 107 +++++++++++++++++++++++++++++++++++----------- + 1 files changed, 82 insertions(+), 25 deletions(-) + +diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c +index 9271470..5271794 100644 +--- a/drivers/mmc/omap_hsmmc.c ++++ b/drivers/mmc/omap_hsmmc.c +@@ -31,6 +31,9 @@ + #include <asm/io.h> + #include <asm/arch/mmc_host_def.h> + ++/* If we fail after 1 second wait, something is really bad */ ++#define MAX_RETRY_MS 1000 ++ + static int mmc_read_data(hsmmc_t *mmc_base, char *buf, unsigned int size); + static int mmc_write_data(hsmmc_t *mmc_base, const char *buf, unsigned int siz); + static struct mmc hsmmc_dev[2]; +@@ -70,18 +73,29 @@ unsigned char mmc_board_init(hsmmc_t *mmc_base) + + void mmc_init_stream(hsmmc_t *mmc_base) + { ++ ulong start; + + writel(readl(&mmc_base->con) | INIT_INITSTREAM, &mmc_base->con); + + writel(MMC_CMD0, &mmc_base->cmd); +- while (!(readl(&mmc_base->stat) & CC_MASK)) +- ; ++ start = get_timer(0); ++ while (!(readl(&mmc_base->stat) & CC_MASK)) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for cc!\n", __func__); ++ return; ++ } ++ } + writel(CC_MASK, &mmc_base->stat) + ; + writel(MMC_CMD0, &mmc_base->cmd) + ; +- while (!(readl(&mmc_base->stat) & CC_MASK)) +- ; ++ start = get_timer(0); ++ while (!(readl(&mmc_base->stat) & CC_MASK)) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for cc2!\n", __func__); ++ return; ++ } ++ } + writel(readl(&mmc_base->con) & ~INIT_INITSTREAM, &mmc_base->con); + } + +@@ -91,16 +105,28 @@ static int mmc_init_setup(struct mmc *mmc) + hsmmc_t *mmc_base = (hsmmc_t *)mmc->priv; + unsigned int reg_val; + unsigned int dsor; ++ ulong start; + + mmc_board_init(mmc_base); + + writel(readl(&mmc_base->sysconfig) | MMC_SOFTRESET, + &mmc_base->sysconfig); +- while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) +- ; ++ start = get_timer(0); ++ while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for cc2!\n", __func__); ++ return TIMEOUT; ++ } ++ } + writel(readl(&mmc_base->sysctl) | SOFTRESETALL, &mmc_base->sysctl); +- while ((readl(&mmc_base->sysctl) & SOFTRESETALL) != 0x0) +- ; ++ start = get_timer(0); ++ while ((readl(&mmc_base->sysctl) & SOFTRESETALL) != 0x0) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for softresetall!\n", ++ __func__); ++ return TIMEOUT; ++ } ++ } + writel(DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0, &mmc_base->hctl); + writel(readl(&mmc_base->capa) | VS30_3V0SUP | VS18_1V8SUP, + &mmc_base->capa); +@@ -116,8 +142,13 @@ static int mmc_init_setup(struct mmc *mmc) + (ICE_STOP | DTO_15THDTO | CEN_DISABLE)); + mmc_reg_out(&mmc_base->sysctl, ICE_MASK | CLKD_MASK, + (dsor << CLKD_OFFSET) | ICE_OSCILLATE); +- while ((readl(&mmc_base->sysctl) & ICS_MASK) == ICS_NOTREADY) +- ; ++ start = get_timer(0); ++ while ((readl(&mmc_base->sysctl) & ICS_MASK) == ICS_NOTREADY) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for ics!\n", __func__); ++ return TIMEOUT; ++ } ++ } + writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl); + + writel(readl(&mmc_base->hctl) | SDBP_PWRON, &mmc_base->hctl); +@@ -137,14 +168,23 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, + { + hsmmc_t *mmc_base = (hsmmc_t *)mmc->priv; + unsigned int flags, mmc_stat; +- unsigned int retry = 0x100000; ++ ulong start; + +- +- while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) +- ; ++ start = get_timer(0); ++ while ((readl(&mmc_base->pstate) & DATI_MASK) == DATI_CMDDIS) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for cmddis!\n", __func__); ++ return TIMEOUT; ++ } ++ } + writel(0xFFFFFFFF, &mmc_base->stat); +- while (readl(&mmc_base->stat)) +- ; ++ start = get_timer(0); ++ while (readl(&mmc_base->stat)) { ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for stat!\n", __func__); ++ return TIMEOUT; ++ } ++ } + /* + * CMDREG + * CMDIDX[13:8] : Command index +@@ -200,15 +240,14 @@ static int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, + writel(cmd->cmdarg, &mmc_base->arg); + writel((cmd->cmdidx << 24) | flags, &mmc_base->cmd); + ++ start = get_timer(0); + do { + mmc_stat = readl(&mmc_base->stat); +- retry--; +- } while ((mmc_stat == 0) && (retry > 0)); +- +- if (retry == 0) { +- printf("%s : timeout: No status update\n", __func__); +- return TIMEOUT; +- } ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s : timeout: No status update\n", __func__); ++ return TIMEOUT; ++ } ++ } while (!mmc_stat); + + if ((mmc_stat & IE_CTO) != 0) + return TIMEOUT; +@@ -253,8 +292,14 @@ static int mmc_read_data(hsmmc_t *mmc_base, char *buf, unsigned int size) + count /= 4; + + while (size) { ++ ulong start = get_timer(0); + do { + mmc_stat = readl(&mmc_base->stat); ++ if (get_timer(0) - start > MAX_RETRY_MS) { ++ printf("%s: timedout waiting for status!\n", ++ __func__); ++ return TIMEOUT; ++ } + } while (mmc_stat == 0); + + if ((mmc_stat & ERRI_MASK) != 0) +@@ -298,8 +343,14 @@ static int mmc_write_data(hsmmc_t *mmc_base, const char *buf, unsigned int size) + count /= 4; + + while (size) { ++ ulong start = get_timer(0); + do { | ||
[-] [+] | Added | 0006-ARMV7-hardfp-build-fix.patch ^ |
@@ -0,0 +1,26 @@ +Index: u-boot-2010.09/arch/arm/cpu/armv7/config.mk +=================================================================== +--- u-boot-2010.09.orig/arch/arm/cpu/armv7/config.mk 2011-02-17 18:43:19.828905882 +0530 ++++ u-boot-2010.09/arch/arm/cpu/armv7/config.mk 2011-02-17 18:43:33.356906110 +0530 +@@ -20,7 +20,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, + # MA 02111-1307 USA + # +-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float ++PLATFORM_RELFLAGS += -fno-common -ffixed-r8 + + # Make ARMv5 to allow more compilers to work, even though its v7a. + PLATFORM_CPPFLAGS += -march=armv5 +Index: u-boot-2010.09/arch/arm/cpu/armv7/omap-common/config.mk +=================================================================== +--- u-boot-2010.09.orig/arch/arm/cpu/armv7/omap-common/config.mk 2011-02-17 18:43:44.080655976 +0530 ++++ u-boot-2010.09/arch/arm/cpu/armv7/omap-common/config.mk 2011-02-17 18:43:52.940656014 +0530 +@@ -20,7 +20,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, + # MA 02111-1307 USA + # +-PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float ++PLATFORM_RELFLAGS += -fno-common -ffixed-r8 + + # Make ARMv5 to allow more compilers to work, even though its v7a. + PLATFORM_CPPFLAGS += -march=armv5 | ||
Added | u-boot-2010.09.tar.bz2 ^ |
Submit package nemo:devel:...:omap3:n900 / udev-rules-n900 (revision 1) to package nemo:testin...:omap3:n900 / udev-rules-n900
[-] [+] | Added | udev-rules-netbook.changes |
[-] [+] | Added | udev-rules.changes ^ |
[-] [+] | Added | udev-rules.spec ^ |
[-] [+] | Added | Remote-controller-keymap-for-tv.patch ^ |
@@ -0,0 +1,45 @@ +diff -urN udev-rules-0.11/tv/95-keymap-btc.rules /tmp/udev-rules-0.11/tv/95-keymap-btc.rules +--- udev-rules-0.11/tv/95-keymap-btc.rules 1970-01-01 08:00:00.000000000 +0800 ++++ /tmp/udev-rules-0.11/tv/95-keymap-btc.rules 2011-04-14 00:22:21.250568331 +0800 +@@ -0,0 +1,6 @@ ++# Setup keymap for BTC USB remote controller used in MeeGo TV ++# ++SUBSYSTEMS=="usb",ACTION!="remove",KERNEL=="event*",ENV{ID_VENDOR_ID}=="046e", ENV{ID_MODEL_ID}=="5577", ENV{ID_USB_INTERFACE_NUM}=="01", RUN+="keymap $name btc-usb-multimedia-cordless-keyboard-mouse" ++ ++ ++ +diff -urN udev-rules-0.11/tv/btc-usb-multimedia-cordless-keyboard-mouse /tmp/udev-rules-0.11/tv/btc-usb-multimedia-cordless-keyboard-mouse +--- udev-rules-0.11/tv/btc-usb-multimedia-cordless-keyboard-mouse 1970-01-01 08:00:00.000000000 +0800 ++++ /tmp/udev-rules-0.11/tv/btc-usb-multimedia-cordless-keyboard-mouse 2011-04-14 00:22:21.250568331 +0800 +@@ -0,0 +1,18 @@ ++#0x10082 sleep #142 ++#0xC00B1 pause #119 ++#0xC00B2 record #167 ++#0xC00B7 stopcd #166 ++#0xC00B4 rewind #168 ++#0xC00B0 play #207 ++#0xC00B3 fastforward #208 ++#0xC00B6 previoussong #165 ++#0xC00B5 nextsong #163 ++#0xC0224 backspace #14 ++#0xC0209 f11 #87 ++#0xC00E9 volumeup #115 ++#0xC00EA volumedown #114 ++0xC009C scrollup #177 ++0xC009D scrolldown #178 ++#0xC00E2 mute #113 ++0xC008D menu #139 ++ +diff -urN udev-rules-0.11/tv/Makefile /tmp/udev-rules-0.11/tv/Makefile +--- udev-rules-0.11/tv/Makefile 1970-01-01 08:00:00.000000000 +0800 ++++ /tmp/udev-rules-0.11/tv/Makefile 2011-04-14 00:22:21.250568331 +0800 +@@ -0,0 +1,9 @@ ++ ++RULES = $(wildcard *.rules) ++KEYMAPS = btc-usb-multimedia-cordless-keyboard-mouse ++ ++install: ++ mkdir -p $(DESTDIR)/lib/udev/rules.d ++ install -m 0644 $(RULES) $(DESTDIR)/lib/udev/rules.d ++ mkdir -p $(DESTDIR)/lib/udev/keymaps ++ install -m 0644 $(KEYMAPS) $(DESTDIR)/lib/udev/keymaps | ||
[-] [+] | Added | 10-n900-ofono.rules ^ |
@@ -0,0 +1,16 @@ +# do not edit this file, it will be overwritten on update +ACTION!="add|change", GOTO="ofono_end" + +# ISI/Phonet drivers +SUBSYSTEM!="net", GOTO="ofono_isi_end" +ATTRS{type}!="820", GOTO="ofono_isi_end" +KERNELS=="gadget", GOTO="ofono_isi_end" + +# Nokia N900 modem +SUBSYSTEMS=="hsi", ENV{OFONO_DRIVER}="n900", ENV{OFONO_ISI_ADDRESS}="108" +KERNEL=="phonet*", ENV{OFONO_DRIVER}="n900", ENV{OFONO_ISI_ADDRESS}="108" + +LABEL="ofono_isi_end" + +LABEL="ofono_end" + | ||
Added | udev-rules-0.11.tar.bz2 ^ |
Submit package nemo:deve...ap3:n900 / usb-moded...fig-n900 (revision 1) to package nemo:test...ap3:n900 / usb-moded...fig-n900
[-] [+] | Added | usb-moded-config-n900.changes |
[-] [+] | Added | usb-moded-config-n900.spec ^ |
[-] [+] | Added | usb-moded.ini ^ |
@@ -0,0 +1,16 @@ +[mountpoints] +mount = /dev/mmcblk1p1 + +#you can add more filesystems to the mount option, by making it a comma-seperated list. + +[sync] +nofua = 1 + +[altmount] +mount = /home/user/MyDocs + +[udev] +path = /sys/class/power_supply/isp1704 + +[usbmode] +mode = developer_mode |
Submit package nemo:devel:h...:omap3:n900 / wl1251-cal-bin (revision 1) to package nemo:testing...:omap3:n900 / wl1251-cal-bin
[-] [+] | Added | wl1251-cal-bin.changes |
[-] [+] | Added | wl1251-cal-bin.spec ^ |
[-] [+] | Added | license.txt ^ |
@@ -0,0 +1,9 @@ +Copyright (c) Nokia Corporation 2010 +All Rights Reserved. + +This material, including documentation and any related computer programs, is +protected by copyright controlled by Nokia Corporation. All rights are +reserved. Modifying, adapting and/or translating, any or all of this material +requires the prior written consent of Nokia. Distribution for commercial +purposes not allowed without prior written approval from Nokia. + | ||
Added | wl1251-cal-bin-0.18-armv7hl.tar.bz2 ^ | |
[-] [+] | Added | wl1251-cal-bin.yaml ^ |
@@ -0,0 +1,17 @@ +Name: wl1251-cal-bin +Summary: Calibration data pusher for wl1251 +Version: 0.18 +Release: 0 +Group: Communications/Connectivity Adaptation +License: Nokia Proprietary +Sources: + - "%{name}-%{version}-armv7hl.tar.bz2" + - "license.txt" + - "wl1251-cal.service" + +Description: This application reads the stored calibration data and pushes it to wl1251. +ExclusiveArch: "%arm" + +SetupOptions: "-q -n %{name}-%{version}-armv7hl" +Configure: none +Builder: none | ||
[-] [+] | Added | wl1251-cal.service ^ |
@@ -0,0 +1,13 @@ +[Unit] +Description=wl1251-cal service to set wlan0 MAC address +DefaultDependencies=no +After=dbus.service +Before=connman.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/wl1251-cal + +[Install] +WantedBy=basic.target + |
Comments for request 66 (0)
There's nothing to be done right now
Request History
sage | created request | 1401982150 almost 10 years ago |
fixes |
||
cibot | Request got a new review request | 1363293982 about 11 years ago |
Under automated review |
||
cibot | Request got reviewed | 1363294022 about 11 years ago |
Prechecks succeeded. |
||
cibot | Request got a new review request | 1363294024 about 11 years ago |
Please replace this text with a review and appro [+]Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest [-] |
||
sage | Request got reviewed | 1363294241 about 11 years ago |
ok |
||
cibot | Request got a new review request | 1363294329 about 11 years ago |
Build trial in progress at https://build.merproj [+]Build trial in progress at https://build.merproject.org/project/monitor?project=nemo:testing:hw:ti:omap3:n900:Trial:SR66 [-] |
||
cibot | Request got reviewed | 1363295638 about 11 years ago |
Build trial succeeded. |
||
cibot | Request got accepted | 1363295719 about 11 years ago |
BOSS accepted this request because: WARNING che [+]BOSS accepted this request because: WARNING check_package_is_complete_sources (contextkit-maemo-battery-rx51-bin) failed: No dsc file found Extra source files: boss.conf, contextkit-maemo-battery-rx51-bin-0.7.14-armv7l.tar.bz2. WARNING check_package_is_complete_sources (libppu-bin) failed: No dsc file found Extra source files: libppu-bin-0.1-armv7hl.tar.bz2, libppu-bin-0.1-armv7l.tar.bz2. Missing source files: libppu-bin-0.1-x86_64.tar.bz2 WARNING check_package_is_complete_sources (libwl1251-bin) failed: No dsc file found Extra source files: libwl1251-bin-0.14-armv7hl.tar.bz2, libwl1251-bin-0.14-armv7l.tar.bz2. Missing source files: libwl1251-bin-0.14-x86_64.tar.bz2 Trial build of packages in nemo:testing:hw:ti:omap3:n900:Trial:SR66 successful [-] |
||
cibot | Review got accepted | 1401982150 almost 10 years ago |
Prechecks succeeded. |
||
sage | Review got accepted | 1401982150 almost 10 years ago |
ok |
||
cibot | Review got accepted | 1401982150 almost 10 years ago |
Build trial succeeded. |