[RESEND][PATCH 1/2] usb: musb: fix the possible panic while resuming

2009-02-26 Thread Kim Kyuwon
While waking up, musb can cause a kernel panic. This patch is fixing
it by enabling the clock in the resume_early method.

Signed-off-by: Kim Kyuwon q1@samsung.com
---
 drivers/usb/musb/musb_core.c |8 ++--
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 2cc34fa..6de2cb2 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2169,16 +2169,13 @@ static int musb_suspend(struct platform_device
*pdev, pm_message_t message)
return 0;
 }

-static int musb_resume(struct platform_device *pdev)
+static int musb_resume_early(struct platform_device *pdev)
 {
-   unsigned long   flags;
struct musb *musb = dev_to_musb(pdev-dev);

if (!musb-clock)
return 0;

-   spin_lock_irqsave(musb-lock, flags);
-
if (musb-set_clock)
musb-set_clock(musb-clock, 1);
else
@@ -2188,7 +2185,6 @@ static int musb_resume(struct platform_device *pdev)
 * unless for some reason the whole soc powered down and we're
 * not treating that as a whole-system restart (e.g. swsusp)
 */
-   spin_unlock_irqrestore(musb-lock, flags);
return 0;
 }

@@ -2206,7 +2202,7 @@ static struct platform_driver musb_driver = {
.remove = __devexit_p(musb_remove),
.shutdown   = musb_shutdown,
.suspend= musb_suspend,
-   .resume = musb_resume,
+   .resume_early   = musb_resume_early,
 };

 /*-*/
-- 
1.5.2.5


-- 
Q1
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Problems while designing TPS65023 regulator driver

2009-02-26 Thread Aggarwal, Anuj

Hi,

I am working on TPS65023 PMIC 
(http://focus.ti.com/docs/prod/folders/print/tps65023.html) regulator driver. 
It supports 3 step-down converters and 2 LDOs, all connected to the same I2C 
device. I am facing some design related issues and need your opinion on the 
same.

Since all the five regulators can be controlled using a single i2c device, I 
made a single i2c_board_info structure in my platform specific file and put all 
the regulator_init_data information there:

code starts
/* MPU voltage regulator of DCDC type */
struct regulator_consumer_supply tps65023_mpu_consumers = {
.supply = vdd1,
};

/* MMC voltage regulator of LDO type */
struct regulator_consumer_supply tps65023_mmc_consumers = {
.supply = mmc,
};

struct regulator_init_data tps_regulator_data[] = {
{
.constraints = {
.min_uV = 80,
.max_uV = 160,
.valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS),
},
.num_consumer_supplies  = 1,
.consumer_supplies  = tps65023_mpu_consumers,
},
.
.
.
{
.constraints = {
.min_uV = 105,
.max_uV = 330,
.valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS),
},
.num_consumer_supplies  = 1,
.consumer_supplies  = tps65023_mmc_consumers,
},
};

static struct i2c_board_info __initdata tps_65023_i2c_board_info[] = {
{
I2C_BOARD_INFO(tps65023, 0x48),
.flags = I2C_CLIENT_WAKE,
.platform_data = tps_regulator_data[0],
},
};

static int __init omap3_evm_i2c_init(void)
{
omap_register_i2c_bus(1, 400, tps_65023_i2c_board_info,
ARRAY_SIZE(tps_65023_i2c_board_info));
.
.
}
code ends

Now, in my regulator driver code, I am creating an array of the available 
regulators, passing that array as driver_data in my i2c_device_id structure and 
registering my i2c_driver using i2c_add_driver() during initialization, as 
shown below:

code starts
#define TPS65023_NUM_DCDC   3
#define TPS65023_NUM_LDO2
#define TPS65023_NUM_REGULATOR  (TPS65023_NUM_DCDC + TPS65023_NUM_LDO)

struct tps_info {
const char  *name;
unsignedmin_uV;
unsignedmax_uV;
boolfixed;
u8  table_len;
const u16   *table;
};

struct tps {
struct regulator_desc   desc[TPS65023_NUM_REGULATOR];
struct i2c_client   *client;
struct regulator_dev*rdev[TPS65023_NUM_REGULATOR];
const struct tps_info   *info[TPS65023_NUM_REGULATOR];
};

static const struct tps_info tps65023_regs[] = {
{
.name = VDCDC1,
.min_uV =  80,
.max_uV = 160,
.fixed = 0,
.table_len = ARRAY_SIZE(VDCDC1_VSEL_table),
.table = VDCDC1_VSEL_table,
},
.   
.
.
{
.name = LDO2,
.min_uV = 100,
.max_uV = 315,
.fixed = 0,
.table_len = ARRAY_SIZE(LDO2_VSEL_table),
.table = LDO2_VSEL_table,
},
};

static const struct i2c_device_id tps_65023_id = {
.name = tps65023,
.driver_data = (unsigned long) tps65023_regs[0],
};

MODULE_DEVICE_TABLE(i2c, tps_65023_id);

static struct i2c_driver tps_65023_i2c_driver = {
.driver = {
.name   =   tps_65023_pwr,
.owner  =   THIS_MODULE,
},
.probe  = tps_65023_probe,
.remove = __devexit_p(tps_65023_remove),
.id_table   = tps_65023_id,
};

/**
 * tps_65023_init
 *
 * Module init function
 */
static int __init tps_65023_init(void)
{
return i2c_add_driver(tps_65023_i2c_driver);
}
late_initcall(tps_65023_init);
code ends

Now, the problem is in the tps_65023_probe function. Since it will be called 
only once as there is only one i2c device, I have to register all the 
regulators in that only. But I am not able to communicate the same to the 
regulator core layer. Inside the regulator_register(), variable init_data, 
which equals to dev-platform_data, is always pointing to the first array 
member, which is coming from the evm specific file. And it fails to register my 
second regulator instance, set_consumer_device_supply() specifically failing 
for the second iteration. Because of this, the probe function fails.

How should I handle this scenario? Am I missing something in my implementation?

Regards,
Anuj Aggarwal
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a 

Re: [patch/rfc 2.6.29-rc6 1/2] regulator: enumerate voltages

2009-02-26 Thread Mark Brown
On Wed, Feb 25, 2009 at 05:02:03PM -0800, David Brownell wrote:

 Oh, one more comment.  Requiring manual configuration
 of fixed-voltage regulators is pure time-wastage.

Unless, of course, you happen to be using one of those consumers that
wants to know the voltage it's running at to configure itself.  Examples
I've seen include sensors and analogue components which can be
configured for better performance if they know the voltage they run at -
and yes, people do run these things off regulators that they vary at
runtime.

If you want to submit a patch making it optional that's fine.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc 2.6.29-rc6 1/2] regulator: enumerate voltages

2009-02-26 Thread Mark Brown
On Wed, Feb 25, 2009 at 03:47:52PM -0800, David Brownell wrote:
 On Wednesday 25 February 2009, Mark Brown wrote:

 In terms of the consumer interface, not -- struct regulator
 is opaque to consumers, and everything is a functional accessor.
 So I'll leave that as-is.

Yes, obviously.

  At present only continous ranges are possible, though. ?I can't think of
  any systems I've seen that'd want discontinous constraints, though I'm
  sure there are some.

 Consider a regulator where voltage selectors 0..3 correspond to
 voltages

   { 3.3V, 1.8V, 4.2V, 5.0V }

 With machine constraints that say voltages go from 3V to 4.5V ...

Continuous ranges of voltages, not continous indexes.  The indexes are
meaningless.  At the minute consumers and machines always supply
constraints as min,max pairs.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


git link for CPU IDLE linux-omap-pm

2009-02-26 Thread Girish Borse
Hi,
  I searched for cpuidle patches for OMAP 3, i found many patches but
could not find   any git link to download the omap kernel in which all
the cpuidle patches are applied .
Can someone please provide me the git link to download the latest
kernel in which all cpuidle patches are applied .



    Thanks
    --Girish
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [alsa-devel] [PATCH 1/3] ASoC: Add GPIO support for jack reporting interface

2009-02-26 Thread Mark Brown
On Thu, Feb 26, 2009 at 01:57:03AM -0600, Lopez Cruz, Misael wrote:

  struct snd_soc_jack_pin {
 + struct snd_soc_jack *jack;
 + struct snd_soc_jack_gpio *gpio_pin;
   struct list_head list;
   const char *pin;
   int mask;
   bool invert;
 + /* GPIO */
 + unsigned int gpio;
 + unsigned int irq;
 + unsigned long irqflags;
 + irq_handler_t handler;
 + struct work_struct work;
  };

This needs to be rethought - it breaks the abstraction layers.

There are three things working together here:

 - The snd_soc_jack, which represents a physical jack on the system and
   is what is visible to user space.
 - The snd_soc_jack_pin, which represents a DAPM pin to update depending
   on some of the status bits supported by the jack.  Each snd_soc_jack
   has zero or more of these which are updated automatically.
 - The jack reporting mechanism, which represents something that can do
   detection - it is associated with a snd_soc_jack, reporting a subset
   of the status bits supported by the snd_soc_jack.  Each jack may
   have multiple reporting mechanisms, though it will need at least one
   to be useful.

These are all hooked together by the machine driver depending on the
system hardware.  The machine driver will set up the snd_soc_jack and
the list of pins to update then set up one or more jack detection
mechanisms to update that jack based on their current status.

For example, a system may have a stereo headset jack with two reporting
mechansms, one for the headphone and one for the microphone.  Some
systems won't be able to use their speaker output while a headphone is
connected and so will want to make sure to update both speaker and
headphone when the headphone jack status changes.

The GPIO jack detection code should operate only on a snd_soc_jack that
is provided to it by a machine driver - you'll need to define a
structure to hold the information the GPIO jack detection needs (there
is a structure there but you've not defined it so I'm not sure what you
have in it at the minute).

Please look at the wm8350 headphone detection for an example of how to
integrate a detection mechanism.

 +static void gpio_work(struct work_struct *work)
 +{
 +   struct snd_soc_jack_pin *pin;
 +   int report;
 +
 +   pin = container_of(work, struct snd_soc_jack_pin, work);
 +   report = pin-jack-status  pin-mask;
 +   if (gpio_get_value(pin-gpio))
 +   report |= pin-mask;
 +   else
 +   report = ~pin-mask;
 +
 +   snd_soc_jack_report(pin-jack, report, pin-jack-jack-type);
 +}

The value to report should be supplied by the machine driver.

BTW, please remember to CC the maintainers of the things you're
submitting patches for.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: git link for CPU IDLE linux-omap-pm

2009-02-26 Thread Premi, Sanjeev
 -Original Message-
 From: linux-omap-ow...@vger.kernel.org 
 [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Girish Borse
 Sent: Thursday, February 26, 2009 5:20 PM
 To: linux-omap@vger.kernel.org
 Subject: git link for CPU IDLE linux-omap-pm
 
 Hi,
   I searched for cpuidle patches for OMAP 3, i found many patches but
 could not find   any git link to download the omap kernel in which all
 the cpuidle patches are applied .
 Can someone please provide me the git link to download the 
 latest kernel in which all cpuidle patches are applied .
 

Take a look at the 'pm' branch.

 
 
     Thanks
     --Girish
 --
 To unsubscribe from this list: send the line unsubscribe 
 linux-omap in the body of a message to 
 majord...@vger.kernel.org More majordomo info at  
 http://vger.kernel.org/majordomo-info.html
 
 --
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Problems while designing TPS65023 regulator driver

2009-02-26 Thread Mark Brown
On Thu, Feb 26, 2009 at 02:41:54PM +0530, Aggarwal, Anuj wrote:

 Since all the five regulators can be controlled using a single i2c
 device, I made a single i2c_board_info structure in my platform
 specific file and put all the regulator_init_data information there:

This is very common - most of the devices that have multiple regulators
also have some other subsystems on them (eg, an RTC or a watchdog) and
use a core driver in drivers/mfd with the individual functions of the
device as child platform drivers so this hasn't come up much.

 Now, the problem is in the tps_65023_probe function. Since it will be
 called only once as there is only one i2c device, I have to register
 all the regulators in that only. But I am not able to communicate the
 same to the regulator core layer. Inside the regulator_register(),
 variable init_data, which equals to dev-platform_data, is always
 pointing to the first array member, which is coming from the evm
 specific file. And it fails to register my second regulator instance,
 set_consumer_device_supply() specifically failing for the second
 iteration. Because of this, the probe function fails.

 How should I handle this scenario? Am I missing something in my 
 implementation?

Use -next or the regulator git at:

git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6

There the init data is passed as a parameter to regulator_register()
rather than being read from the platform data so the problem goes away.
The relevant commit is 8ec143c801ff0514ce92e69aa2f7bd48e73b9baa.

[Please fix your mail client to wrap at 80 columns - currently you have
no line breaks in paragraphs which makes your mails a bit hard to read
and reply to.]
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] ASoC: Add GPIO support for jack reporting interface

2009-02-26 Thread David Brownell
On Wednesday 25 February 2009, Lopez Cruz, Misael wrote:
 +   unsigned int gpio;

Use int not unsigned for such might-be-a-GPIO codes ...

 +   unsigned int irq;
 +   unsigned long irqflags;
 +   irq_handler_t handler;
 +   struct work_struct work;
  };
  
 +#define NO_JACK_PIN_GPIO   UINT_MAX

And any negative number to flag no GPIO;
-EINVAL for example.


 +   if (pins[i].gpio != NO_JACK_PIN_GPIO) {

Make that:  if (gpio_is_valid(pins[i].gpio)) ...




--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc 2.6.29-rc6 1/2] regulator: enumerate voltages

2009-02-26 Thread Mark Brown
On Thu, Feb 26, 2009 at 10:56:05AM -0800, David Brownell wrote:
 On Thursday 26 February 2009, Mark Brown wrote:

  Unless, of course, you happen to be using one of those consumers that
  wants to know the voltage it's running at to configure itself.

 In which case it can ask the regulator what voltage it's using.  :)

I suspect we're talking at cross purposes here - I was talking about the
fixed voltage regulator driver.  I suspect you were talking about
something else?
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc 2.6.29-rc6 1/2] regulator: enumerate voltages

2009-02-26 Thread David Brownell
On Thursday 26 February 2009, Mark Brown wrote:
 On Thu, Feb 26, 2009 at 10:56:05AM -0800, David Brownell wrote:
  On Thursday 26 February 2009, Mark Brown wrote:
 
   Unless, of course, you happen to be using one of those consumers that
   wants to know the voltage it's running at to configure itself.
 
  In which case it can ask the regulator what voltage it's using.  :)
 
 I suspect we're talking at cross purposes here - I was talking about the
 fixed voltage regulator driver.  I suspect you were talking about
 something else?

Yes ... e.g. the USB1V5, USB1V, and USB3V1 regulators
exported through the twl4030 regulator driver.


Semi-related:  someone with time to spend on it might
find and fix the bug causing the regulator framework
to oops when regulator/core.c::set_machine_constraints()
returns an error code.

- Dave

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2.6.29-rc6 1/2] regulator: enumerate voltages (v2)

2009-02-26 Thread David Brownell
From: David Brownell dbrown...@users.sourceforge.net

Add a basic mechanism for regulators to report the discrete
voltages they support:  list_voltage() enumerates them using
selectors numbered from 0 to an upper bound.

Use those methods to force machine-level constraints into bounds.
(Example:  regulator supports 1.8V, 2.4V, 2.6V, 3.3V, and board
constraints for that rail are 2.0V to 3.6V ... so the range of
voltages is then 2.4V to 3.3V on this board.)

Export those voltages to the regulator consumer interface, so for
example regulator hooked up to an MMC/SD/SDIO slot can report the
actual voltage options available to cards connected there.

Signed-off-by: David Brownell dbrown...@users.sourceforge.net
---
Updates since previous version:  address feedback, simplify.

 drivers/regulator/core.c   |  113 +++
 include/linux/regulator/consumer.h |2 
 include/linux/regulator/driver.h   |9 ++
 3 files changed, 124 insertions(+)

--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -719,6 +719,69 @@ static int set_machine_constraints(struc
else
name = regulator;
 
+   /* constrain machine-level voltage specs to fit
+* the actual range supported by this regulator.
+*/
+   if (ops-list_voltage  rdev-desc-n_voltages) {
+   int count = rdev-desc-n_voltages;
+   int i;
+   int min_uV = INT_MAX;
+   int max_uV = INT_MIN;
+   int cmin = constraints-min_uV;
+   int cmax = constraints-max_uV;
+
+   /* it's safe to autoconfigure fixed-voltage supplies */
+   if (count == 1  !cmin) {
+   cmin = INT_MIN;
+   cmax = INT_MAX;
+   }
+
+   /* else require explicit machine-level constraints */
+   else if (cmin = 0 || cmax = 0 || cmax  cmin) {
+   pr_err(%s: %s '%s' voltage constraints\n,
+  __func__, invalid, name);
+   ret = -EINVAL;
+   goto out;
+   }
+
+   /* initial: [cmin..cmax] valid, [min_uV..max_uV] not */
+   for (i = 0; i  count; i++) {
+   int value;
+
+   value = ops-list_voltage(rdev, i);
+   if (value = 0)
+   continue;
+
+   /* maybe adjust [min_uV..max_uV] */
+   if (value = cmin  value  min_uV)
+   min_uV = value;
+   if (value = cmax  value  max_uV)
+   max_uV = value;
+   }
+
+   /* final: [min_uV..max_uV] valid iff constraints valid */
+   if (max_uV  min_uV) {
+   pr_err(%s: %s '%s' voltage constraints\n,
+  __func__, unsupportable, name);
+   ret = -EINVAL;
+   goto out;
+   }
+
+   /* use regulator's subset of machine constraints */
+   if (constraints-min_uV  min_uV) {
+   pr_debug(%s: override '%s' %s, %d - %d\n,
+  __func__, name, min_uV,
+   constraints-min_uV, min_uV);
+   constraints-min_uV = min_uV;
+   }
+   if (constraints-max_uV  max_uV) {
+   pr_debug(%s: override '%s' %s, %d - %d\n,
+  __func__, name, max_uV,
+   constraints-max_uV, max_uV);
+   constraints-max_uV = max_uV;
+   }
+   }
+
rdev-constraints = constraints;
 
/* do we need to apply the constraint voltage */
@@ -1245,6 +1308,56 @@ int regulator_is_enabled(struct regulato
 EXPORT_SYMBOL_GPL(regulator_is_enabled);
 
 /**
+ * regulator_count_voltages - count regulator_list_voltage() selectors
+ * @regulator: regulator source
+ *
+ * Returns number of selectors, or negative errno.  Selectors are
+ * numbered starting at zero, and typically correspond to bitfields
+ * in hardware registers.
+ */
+int regulator_count_voltages(struct regulator *regulator)
+{
+   struct regulator_dev*rdev = regulator-rdev;
+
+   return rdev-desc-n_voltages ? : -EINVAL;
+}
+EXPORT_SYMBOL_GPL(regulator_count_voltages);
+
+/**
+ * regulator_list_voltage - enumerate supported voltages
+ * @regulator: regulator source
+ * @selector: identify voltage to list
+ * Context: can sleep
+ *
+ * Returns a voltage that can be passed to @regulator_set_voltage(),
+ * zero if this selector code can't be used on this sytem, or a
+ * negative errno.
+ */
+int regulator_list_voltage(struct regulator *regulator, unsigned selector)
+{
+   struct regulator_dev*rdev = regulator-rdev;
+   

[patch/rfc 2.6.29-rc6 2/2] regulator: twl4030 voltage enumeration (v2)

2009-02-26 Thread David Brownell
From: David Brownell dbrown...@users.sourceforge.net

Update previously-posted twl4030 regulator driver to export
supported voltages to upper layers using a new mechanism.

Signed-off-by: David Brownell dbrown...@users.sourceforge.net
---
Updates since previous version:  match updated [1/2] interfaces.

Note that the twl4030 regulator patch referred to will need a
minor patch to work with the -next tree, because of interface
change in the regulator framework.

 drivers/regulator/twl4030-regulator.c |   62 +++-
 1 file changed, 23 insertions(+), 39 deletions(-)

--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -42,7 +42,6 @@ struct twlreg_info {
 
/* chip constraints on regulator behavior */
u16 min_mV;
-   u16 max_mV;
 
/* used by regulator core */
struct regulator_desc   desc;
@@ -262,6 +261,14 @@ static const u16 VDAC_VSEL_table[] = {
 };
 
 
+static int twl4030ldo_list_voltage(struct regulator_dev *rdev, unsigned index)
+{
+   struct twlreg_info  *info = rdev_get_drvdata(rdev);
+   int mV = info-table[index];
+
+   return IS_UNSUP(mV) ? 0 : (LDO_MV(mV) * 1000);
+}
+
 static int
 twl4030ldo_set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV)
 {
@@ -276,6 +283,8 @@ twl4030ldo_set_voltage(struct regulator_
continue;
uV = LDO_MV(mV) * 1000;
 
+   /* REVISIT for VAUX2, first match may not be best/lowest */
+
/* use the first in-range value */
if (min_uV = uV  uV = max_uV)
return twl4030reg_write(info, VREG_DEDICATED, vsel);
@@ -297,6 +306,8 @@ static int twl4030ldo_get_voltage(struct
 }
 
 static struct regulator_ops twl4030ldo_ops = {
+   .list_voltage   = twl4030ldo_list_voltage,
+
.set_voltage= twl4030ldo_set_voltage,
.get_voltage= twl4030ldo_get_voltage,
 
@@ -314,6 +325,13 @@ static struct regulator_ops twl4030ldo_o
 /*
  * Fixed voltage LDOs don't have a VSEL field to update.
  */
+static int twl4030fixed_list_voltage(struct regulator_dev *rdev, unsigned 
index)
+{
+   struct twlreg_info  *info = rdev_get_drvdata(rdev);
+
+   return info-min_mV * 1000;
+}
+
 static int twl4030fixed_get_voltage(struct regulator_dev *rdev)
 {
struct twlreg_info  *info = rdev_get_drvdata(rdev);
@@ -322,6 +340,8 @@ static int twl4030fixed_get_voltage(stru
 }
 
 static struct regulator_ops twl4030fixed_ops = {
+   .list_voltage   = twl4030fixed_list_voltage,
+
.get_voltage= twl4030fixed_get_voltage,
 
.enable = twl4030reg_enable,
@@ -343,6 +363,7 @@ static struct regulator_ops twl4030fixed
.desc = { \
.name = #label, \
.id = TWL4030_REG_##label, \
+   .n_voltages = ARRAY_SIZE(label##_VSEL_table), \
.ops = twl4030ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -353,10 +374,10 @@ static struct regulator_ops twl4030fixed
.base = offset, \
.id = num, \
.min_mV = mVolts, \
-   .max_mV = mVolts, \
.desc = { \
.name = #label, \
.id = TWL4030_REG_##label, \
+   .n_voltages = 1, \
.ops = twl4030fixed_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -402,14 +423,11 @@ static int twl4030reg_probe(struct platf
struct regulator_init_data  *initdata;
struct regulation_constraints   *c;
struct regulator_dev*rdev;
-   int min_uV, max_uV;
 
for (i = 0, info = NULL; i  ARRAY_SIZE(twl4030_regs); i++) {
if (twl4030_regs[i].desc.id != pdev-id)
continue;
info = twl4030_regs + i;
-   min_uV = info-min_mV * 1000;
-   max_uV = info-max_mV * 1000;
break;
}
if (!info)
@@ -423,10 +441,6 @@ static int twl4030reg_probe(struct platf
 * this driver and the chip itself can actually do.
 */
c = initdata-constraints;
-   if (!c-min_uV || c-min_uV  min_uV)
-   c-min_uV = min_uV;
-   if (!c-max_uV || c-max_uV  max_uV)
-   c-max_uV = max_uV;
c-valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY;
c-valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
@@ -471,36 +485,6 @@ static struct platform_driver twl4030reg
 
 static int __init twl4030reg_init(void)
 {
-   unsigned i, j;
-
-   /* determine min/max voltage constraints, taking into account
-* whether set_voltage() will use the unsupported settings
-*/
-   for (i = 0; i  ARRAY_SIZE(twl4030_regs); i++) {
-   struct 

Re: [patch 2.6.29-rc6 1/2] regulator: enumerate voltages (v2)

2009-02-26 Thread Mark Brown
On Thu, Feb 26, 2009 at 11:48:36AM -0800, David Brownell wrote:

 Updates since previous version:  address feedback, simplify.

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

This looks good to merge to me - coincidentally I've got a use case for
it lined up already.  Might it be worth merging the MMC client along
with this patch if the relevant maintainers are OK with that, could help
get it in faster?

Just two very minor points which might be nice to fix at some point:

 + cmin = INT_MIN;
 + cmax = INT_MAX;
 + }
 +
 + /* else require explicit machine-level constraints */
 + else if (cmin = 0 || cmax = 0 || cmax  cmin) {

That indentation is going to catch some people out :)

 + /* final: [min_uV..max_uV] valid iff constraints valid */
 + if (max_uV  min_uV) {
 + pr_err(%s: %s '%s' voltage constraints\n,
 +__func__, unsupportable, name);
 + ret = -EINVAL;

That style is going to hurt grepability for the error.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2.6.29-rc6 1/2] regulator: enumerate voltages (v2)

2009-02-26 Thread David Brownell
On Thursday 26 February 2009, Mark Brown wrote:
 On Thu, Feb 26, 2009 at 11:48:36AM -0800, David Brownell wrote:
 
  Updates since previous version:  address feedback, simplify.
 
 Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com
 
 This looks good to merge to me - coincidentally I've got a use case for
 it lined up already.  Might it be worth merging the MMC client along
 with this patch if the relevant maintainers are OK with that, could help
 get it in faster?

You mean, that example MMC code I sent?  I think it's a bit
early to merge to mainline ... only the generate ocr_mask
call has really been verified.  I'll send the updated version
along though.

I had thought about sending that with patches to convert the
omap_hsmmc driver over to the regulator framework.  No skin
off my back if it goes with a different set of patches though.


 Just two very minor points which might be nice to fix at some point:
 
  +   cmin = INT_MIN;
  +   cmax = INT_MAX;
  +   }
  +
  +   /* else require explicit machine-level constraints */
  +   else if (cmin = 0 || cmax = 0 || cmax  cmin) {
 
 That indentation is going to catch some people out :)

Maybe.


  +   /* final: [min_uV..max_uV] valid iff constraints valid */
  +   if (max_uV  min_uV) {
  +   pr_err(%s: %s '%s' voltage constraints\n,
  +  __func__, unsupportable, name);
  +   ret = -EINVAL;
 
 That style is going to hurt grepability for the error.

grep unsupportable ... :)

Sharing the primary string saves about three dozen bytes,
and I'm not keen on needless bloat.

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2.6.29-rc6 1/2] regulator: enumerate voltages (v2)

2009-02-26 Thread Liam Girdwood
On Thu, 2009-02-26 at 13:28 -0800, David Brownell wrote:
 On Thursday 26 February 2009, Liam Girdwood wrote:
  Applied with git-am merge conflicts. It builds ok, can you check against
  your tree.
 
 What were the conflicts -- just offsets?
 
 Your -next regulator tree seems to be missing a doc patch
 you had asked for, maybe that's an issue.
 
 - Dave
 
 === CUT HERE
 From: David Brownell dbrown...@users.sourceforge.net
 Subject: regulator: get_status() grows kerneldoc
 
 Add kerneldoc for the new get_status() message.  Fix the existing
 kerneldoc for that struct in two ways:
 
  (a) Syntax, making sure parameter descriptions immediately
  follow the one-line struct description and that the first
  blank lines is before any more expansive description;
  (b) Presentation for a few points, to highlight the fact that
  the previous get methods exist only to report the current
  configuration, not to display actual status.
 
 Signed-off-by: David Brownell dbrown...@users.sourceforge.net
 ---
  include/linux/regulator/driver.h |   22 ++
  1 file changed, 10 insertions(+), 12 deletions(-)

Thanks.

Fixed.

Liam

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2.6.29-rc3-git 1/2] regulator: twl4030 regulators

2009-02-26 Thread Liam Girdwood
On Sun, 2009-02-08 at 10:37 -0800, David Brownell wrote:
 From: David Brownell dbrown...@users.sourceforge.net
 
 Support most of the LDO regulators in the twl4030 family chips.
 In the case of LDOs supporting MMC/SD, the voltage controls are
 used; but in most other cases, the regulator framework is only
 used to enable/disable a supplies, conserving power when a given
 voltage rail is not needed.
 
 The drivers/mfd/twl4030-core.c code already sets up the various
 regulators according to board-specific configuration, and knows
 that some chips don't provide the full set of voltage rails.
 
 The omitted regulators are intended to be under hardware control,
 such as during the hardware-mediated system powerup, powerdown,
 and suspend states.  Unless/until software hooks are known to
 be safe, they won't be exported here.
 
 These regulators implement the new get_status() operation, but
 can't realistically implement get_mode(); the status output is
 effectively the result of a vote, with the relevant hardware
 inputs not exposed.
 
 Signed-off-by: David Brownell dbrown...@users.sourceforge.net

Applied.

Thanks

Liam

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2.6.29-rc3-git 2/2] USB: disable twl4030 USB regulators when cable unplugged

2009-02-26 Thread Liam Girdwood
On Sun, 2009-02-08 at 10:52 -0800, David Brownell wrote:
 From: Kalle Jokiniemi kalle.jokini...@digia.com
 
 This patch disables LDO regulators VUSB1V5, VUSB1V8, and VUSB3V1
 when the USB cable is unplugged, to eliminate that source of power
 waste.  (Enabled LDOs consume power at all times.)
 
 Signed-off-by: Kalle Jokiniemi kalle.jokini...@digia.com
 Signed-off-by: David Brownell dbrown...@users.sourceforge.net
 ---
 Depends on the twl4030 regulator driver, so I'm suggesting this
 be merged (with that driver) through the regulator patch queue
 to simplify things.
 
  drivers/usb/otg/twl4030-usb.c |   30 --
  1 file changed, 24 insertions(+), 6 deletions(-)

Applied.

Thanks

Liam

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc 2.6.29-rc6 2/2] regulator: twl4030 voltage enumeration (v2)

2009-02-26 Thread Liam Girdwood
On Thu, 2009-02-26 at 11:50 -0800, David Brownell wrote:
 From: David Brownell dbrown...@users.sourceforge.net
 
 Update previously-posted twl4030 regulator driver to export
 supported voltages to upper layers using a new mechanism.
 
 Signed-off-by: David Brownell dbrown...@users.sourceforge.net
 ---
 Updates since previous version:  match updated [1/2] interfaces.
 
 Note that the twl4030 regulator patch referred to will need a
 minor patch to work with the -next tree, because of interface
 change in the regulator framework.
 
  drivers/regulator/twl4030-regulator.c |   62 +++-
  1 file changed, 23 insertions(+), 39 deletions(-)

Applied.

Thanks

Liam

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[OMAPZOOM][PATCH 0/3] ISP: Component order

2009-02-26 Thread Dominic Curran
From: Dominic Curran dcur...@ti.com
Subject:[OMAPZOOM][PATCH 0/3] ISP: Component order

The RAW10 component order for all three sensors I test with (MT9P012, OV3640  
IMX046) is different.  This patch set uses different horz/vert offsets in CCDC 
so that the output RAW component order is the same for all sensors.

Currently sph and slv in the board file (for MT  OV) are used to fix component 
order in Previewer. However this approach doesn't work for the Sony IMX046 
sensor.
This patch causes the component order output of CCDC to be the same for all 
sensors.  Since the order is the same going into Previewer this means that 
there 
is not need for sph and slv to change per sensor.

 woffsethoffset  RAW10 test YUV test
MT9P012GR..BG  1  0OK OK
IMX046 RG..GB  0  0OK OK
OV3640 BG..GR  1  1OK OK

Patch:
1/3  Removes original bug introduced with IMX046 patch.
2/3  Changes in CCDC to all easy setup of component order in board file.
3/3  Remove no longer needed prev_sph  prev_slv from boad file. 

Testing:
The following tests have been run using this patch set [x = working]:
(Test apps below are internal TI tools which test basic V4L2 functions)

IMX046  streaming 3 YUYV QVGA 1 500 x
streaming 3 YUYV VGA 1 500  x
streaming 3 YUYV 208 154 1 500  x
streaming 3 YUYV 854 480 1 500  x
fps 3 YUYV 640 480 200 30fps
fps 3 YUYV 3280 2464 100   7.5fps
burst_mode 3 YUYV 816 616 1 file.yuvx
burst_mode 3 YUYV 3280 2464 1 file.yuv  x
burst_mode 3 RAW10 3280 616 1 file.raw  x (h)

MT9P012 ./streaming_frame 1 15 YUYV QVGA 1 200  x
./streaming_frame 1 30 YUYV QVGA 1 200  x
./streaming_frame 1 15 YUYV VGA 1 200   x
./streaming_frame 1 30 YUYV VGA 1 200   x
burst_mode 1 YUYV 5MP 1 file.yuvx
burst_mode 1 RAW10 5MP 1 file.raw   x (h)
streaming_zoom 1 YUYV VGA   x


OV3640  streaming 2 YUYV 256 192 1 300  x
streaming 2 YUYV QVGA 1 300 x
streaming 2 YUYV VGA 1 300  x
burst_mode 2 YUYV XGA 1 file.yuvx
burst_mode 2 YUYV QXGA 1 file.yuv   x
burst_mode 2 RAW10 QXGA 1 file.raw  x (h)
fps 2 YUYV VGA 200  30fps
fps 2 YUYV QXGA 100 15  15fps
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[OMAPZOOM][PATCH 1/3] ISP: Remove hardcoding of CCDC input offset.

2009-02-26 Thread Dominic Curran
From: Dominic Curran dcur...@ti.com
Subject: [OMAPZOOM][PATCH 1/3] ISP: Remove hardcoding of CCDC input offset.

The Sony IMX046 patch set introduced a bug when setting CCDC input offsets.
The Sony patch set the horz  vert offsets to 0.
This worked from the Sony IMX046, but broke settings for other sensors like 
MT9P012  OV3640.
The reason is that all three sensors send their data with different component 
orders.

The effect was to mess up colours in previewer module for MT9P012  OV3640.
This patch reverts that bug.

The other patches in this set will provide a better way of setting these 
offsets, 
thus allowing easy setup for any type kind of incoming componenet order.

Signed-off-by: Dominic Curran dcur...@ti.com
---
 drivers/media/video/isp/ispccdc.c |2 --
 1 file changed, 2 deletions(-)

Index: omapzoom04/drivers/media/video/isp/ispccdc.c
===
--- omapzoom04.orig/drivers/media/video/isp/ispccdc.c
+++ omapzoom04/drivers/media/video/isp/ispccdc.c
@@ -1265,8 +1265,6 @@ int ispccdc_config_size(u32 input_w, u32
}
 
if (ispccdc_obj.ccdc_outfmt == CCDC_OTHERS_VP) {
-   ispccdc_obj.ccdcin_woffset = 0;
-   ispccdc_obj.ccdcin_hoffset = 0;
omap_writel((ispccdc_obj.ccdcin_woffset 
ISPCCDC_FMT_HORZ_FMTSPH_SHIFT) |
(ispccdc_obj.ccdcin_w 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 2.6.29-rc6+misc] MMC: regulator utilities

2009-02-26 Thread David Brownell
From: David Brownell dbrown...@users.sourceforge.net

Add optional glue between MMC and regulator stacks, using a new
regulator interface to learn what voltages are available.

This is intended to be selected and driven by MMC host adapters.
It only handles reusable parts of the regulator-to-MMC glue; the
adapter drivers will have access to details that affect how this
is used.  Examples include when to use multiple voltage rails or
configure (internal or external) level shifters.

Signed-off-by: David Brownell dbrown...@users.sourceforge.net
---
Changes from previous version:  adapter must select this, and
callers now pass in the regulator.  mmc_regulator_set_ocr()
is still not tested, mmc_regulator_get_ocrmask() passed sanity
testing.

Pierre:  Mark may have a need for this soonish.  The omap_hsmmc
code will want it at some point.

 drivers/mmc/core/Kconfig |7 +++
 drivers/mmc/core/core.c  |   84 +
 include/linux/mmc/host.h |5 ++
 3 files changed, 96 insertions(+)

--- a/drivers/mmc/core/Kconfig
+++ b/drivers/mmc/core/Kconfig
@@ -14,3 +14,10 @@ config MMC_UNSAFE_RESUME
  This option is usually just for embedded systems which use
  a MMC/SD card for rootfs. Most people should say N here.
 
+config MMC_REGULATOR
+   bool
+   depends on REGULATOR
+   help
+ Select this if your MMC host adapter driver wants helper
+ utilities for accessing power rails.
+
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -21,6 +21,7 @@
 #include linux/leds.h
 #include linux/scatterlist.h
 #include linux/log2.h
+#include linux/regulator/consumer.h
 
 #include linux/mmc/card.h
 #include linux/mmc/host.h
@@ -523,6 +524,89 @@ u32 mmc_vddrange_to_ocrmask(int vdd_min,
 }
 EXPORT_SYMBOL(mmc_vddrange_to_ocrmask);
 
+#ifdef CONFIG_MMC_REGULATOR
+
+/**
+ * mmc_regulator_get_ocrmask - return mask of supported voltages
+ * @host: mmc host whose supply will be consulted
+ * @supply: regulator to use
+ *
+ * This returns either a negative errno, or a mask of voltages that
+ * can be provided to MMC/SD/SDIO devices using the specified voltage
+ * regulator.  This would normally be called before registering the
+ * MMC host adapter.
+ */
+int mmc_regulator_get_ocrmask(struct mmc_host *host, struct regulator *supply)
+{
+   int result = 0;
+   int count;
+   int i;
+
+   count = regulator_count_voltages(supply);
+   if (count  0)
+   return count;
+
+   for (i = 0; i  count; i++) {
+   int vdd_uV;
+   int vdd_mV;
+
+   vdd_uV = regulator_list_voltage(supply, i);
+   if (vdd_uV = 0)
+   continue;
+
+   vdd_mV = vdd_uV / 1000;
+   result |= mmc_vddrange_to_ocrmask(vdd_mV, vdd_mV);
+   }
+
+   return result;
+}
+EXPORT_SYMBOL(mmc_regulator_get_ocrmask);
+
+/**
+ * mmc_regulator_set_ocr - set regulator to match host-ios voltage
+ * @host: mmc host whose supply voltage will be changed
+ * @supply: regulator to use
+ *
+ * MMC host drivers may use this to enable or disable a regulator using
+ * a particular supply voltage.  This would normally be called from the
+ * set_ios() method.
+ */
+int mmc_regulator_set_ocr(struct mmc_host *host, struct regulator *supply)
+{
+   int result = 0;
+   int min_mV, max_mV;
+   int enabled;
+
+   enabled = regulator_is_enabled(supply);
+   if (enabled  0)
+   return enabled;
+
+   if (host-ios.vdd) {
+   int tmp;
+
+   tmp = host-ios.vdd - ilog2(MMC_VDD_165_195);
+   if (tmp == 0) {
+   min_mV = 1650;
+   max_mV = 1950;
+   } else {
+   min_mV = 2000 + tmp * 100;
+   max_mV = min_mV + 100;
+   }
+
+   result = regulator_set_voltage(supply,
+   min_mV * 1000, max_mV * 1000);
+   if (result == 0  !enabled)
+   result = regulator_enable(supply);
+   } else if (enabled) {
+   result = regulator_disable(supply);
+   }
+
+   return result;
+}
+EXPORT_SYMBOL(mmc_regulator_set_ocr);
+
+#endif
+
 /*
  * Mask off any voltages we don't support and select
  * the lowest voltage
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -192,5 +192,10 @@ static inline void mmc_signal_sdio_irq(s
wake_up_process(host-sdio_irq_thread);
 }
 
+struct regulator;
+
+int mmc_regulator_get_ocrmask(struct mmc_host *host, struct regulator *supply);
+int mmc_regulator_set_ocr(struct mmc_host *host, struct regulator *supply);
+
 #endif
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org

Re: [patch 2.6.29-rc3-git 2/2] USB: disable twl4030 USB regulators when cable unplugged

2009-02-26 Thread David Brownell
On Thursday 26 February 2009, Liam Girdwood wrote:
 On Sun, 2009-02-08 at 10:52 -0800, David Brownell wrote:
  From: Kalle Jokiniemi kalle.jokini...@digia.com
  
  This patch disables LDO regulators VUSB1V5, VUSB1V8, and VUSB3V1
  when the USB cable is unplugged, to eliminate that source of power
  waste.  (Enabled LDOs consume power at all times.)
  
  Signed-off-by: Kalle Jokiniemi kalle.jokini...@digia.com
  Signed-off-by: David Brownell dbrown...@users.sourceforge.net
  ---
  Depends on the twl4030 regulator driver, so I'm suggesting this
  be merged (with that driver) through the regulator patch queue
  to simplify things.
  
   drivers/usb/otg/twl4030-usb.c |   30 --
   1 file changed, 24 insertions(+), 6 deletions(-)
 
 Applied.

Better suggestion:  grab Kalle's updated patch from Greg's USB
queue:

  http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-04-usb/

patch name usb-twl-disable-vusb-regulators-when-cable-unplugged.patch

- Dave
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[OMAPZOOM][PATCH 3/3] ISP: Remove unneeded Previewer offset settings.

2009-02-26 Thread Dominic Curran
From: Dominic Curran dcur...@ti.com
Subject: [OMAPZOOM][PATCH 3/3] ISP: Remove unneeded Previewer offset settings.

Before this patch set the component order was controlled by chnaging offsets in 
the Previewer module.
This was rather unsatifactory because output component order from CCDC differed 
depending on sensor.

The 2nd patch in this series fixes this and causes the CCDC output component 
order to be consistent for all sensors regardless of the input order.

This means that input component order is always the same for Previewer, and 
therefore there is no need to compensate for different offsets in Previewer.

This patch removed the Preveiwer offset compensation from the board file, whic 
is 
now unnecessary.


Signed-off-by: Dominic Curran dcur...@ti.com
---
 arch/arm/mach-omap2/board-3430sdp.c |6 --
 arch/arm/mach-omap2/board-ldp.c |2 --
 arch/arm/mach-omap2/board-zoom2.c   |2 --
 drivers/media/video/isp/isp.c   |1 -
 drivers/media/video/isp/isp.h   |2 --
 5 files changed, 13 deletions(-)

Index: omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-3430sdp.c
+++ omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
@@ -657,8 +657,6 @@ static struct isp_interface_config mt9p0
.strobe = 0x0,
.prestrobe = 0x0,
.shutter = 0x0,
-   .prev_sph = 2,
-   .prev_slv = 0,
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub = 42,
.raw_fmt_in = ISPCCDC_INPUT_FMT_GR_BG,
@@ -782,8 +780,6 @@ static struct isp_interface_config ov364
.strobe = 0x0,
.prestrobe = 0x0,
.shutter = 0x0,
-   .prev_sph = 2,
-   .prev_slv = 0,
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
@@ -992,8 +988,6 @@ static struct isp_interface_config imx04
.strobe = 0x0,
.prestrobe  = 0x0,
.shutter= 0x0,
-   .prev_sph   = 2,
-   .prev_slv   = 0,
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub  = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
Index: omapzoom04/arch/arm/mach-omap2/board-ldp.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-ldp.c
+++ omapzoom04/arch/arm/mach-omap2/board-ldp.c
@@ -622,8 +622,6 @@ static struct isp_interface_config ov364
.strobe = 0x0,
.prestrobe = 0x0,
.shutter = 0x0,
-   .prev_sph = 2,
-   .prev_slv = 0,
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
Index: omapzoom04/arch/arm/mach-omap2/board-zoom2.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-zoom2.c
+++ omapzoom04/arch/arm/mach-omap2/board-zoom2.c
@@ -368,8 +368,6 @@ static struct isp_interface_config imx04
.strobe = 0x0,
.prestrobe  = 0x0,
.shutter= 0x0,
-   .prev_sph   = 2,
-   .prev_slv   = 0,
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub  = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
Index: omapzoom04/drivers/media/video/isp/isp.c
===
--- omapzoom04.orig/drivers/media/video/isp/isp.c
+++ omapzoom04/drivers/media/video/isp/isp.c
@@ -949,7 +949,6 @@ int isp_configure_interface(struct isp_i
ISPCCDC_VDINT);
 
/* Set sensor specific fields in CCDC and Previewer module.*/
-   isppreview_set_skip(config-prev_sph, config-prev_slv);
ispccdc_set_wenlog(config-wenlog);
ispccdc_set_dcsub(config-dcsub);
ispccdc_set_crop_offset(config-raw_fmt_in);
Index: omapzoom04/drivers/media/video/isp/isp.h
===
--- omapzoom04.orig/drivers/media/video/isp/isp.h
+++ omapzoom04/drivers/media/video/isp/isp.h
@@ -202,8 +202,6 @@ struct isp_interface_config {
int strobe;
int prestrobe;
int shutter;
-   u32 prev_sph;
-   u32 prev_slv;
u32 wenlog;
u32 dcsub;
enum ispccdc_raw_fmt raw_fmt_in;
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/13] Omap header clean-up for next merge window

2009-02-26 Thread Tony Lindgren
Hi all,

This series gets rid of the board-*.h includes from hardware.h
as suggested earlier by Russell King.

Regards,

Tony

---

Tony Lindgren (13):
  ARM: OMAP: Remove remaining board-*.h includes from hardware.h
  ARM: OMAP: No need to include board-nokia.h from hardware.h
  ARM: OMAP: No need to include board-overo.h from hardware.h
  ARM: OMAP: No need to include board-ldp.h from hardware.h
  ARM: OMAP: No need to include board-h4.h from hardware.h
  ARM: OMAP: No need to include board-apollon.h from hardware.h
  ARM: OMAP: No need to include board-omap2430sdp.h from hardware.h
  ARM: OMAP: No need to include board-palm*.h from hardware.h
  ARM: OMAP: No need to include board-osk.h from hardware.h
  ARM: OMAP: No need to include board-innovator.h from hardware.h
  ARM: OMAP: No need to include board-h3.h from hardware.h
  ARM: OMAP: No need to include board-h2.h from hardware.h
  ARM: OMAP: No need to include board-perseus2.h or board-fsample.h from 
hardware.h


 arch/arm/mach-omap1/board-fsample.c|   34 +
 arch/arm/mach-omap1/board-h2-mmc.c |2 +
 arch/arm/mach-omap1/board-h2.c |5 +
 arch/arm/mach-omap1/board-h2.h |5 -
 arch/arm/mach-omap1/board-h3-mmc.c |2 +
 arch/arm/mach-omap1/board-h3.c |5 +
 arch/arm/mach-omap1/board-h3.h |5 -
 arch/arm/mach-omap1/board-innovator.c  |3 +
 arch/arm/mach-omap1/board-osk.c|   14 
 arch/arm/mach-omap1/board-palmte.c |   15 
 arch/arm/mach-omap1/board-palmtt.c |7 ++
 arch/arm/mach-omap1/board-palmz71.c|   10 +++
 arch/arm/mach-omap1/board-sx1-mmc.c|1 
 arch/arm/mach-omap1/board-sx1.c|1 
 arch/arm/mach-omap2/board-2430sdp.c|   13 ++--
 arch/arm/mach-omap2/board-apollon.c|1 
 arch/arm/mach-omap2/board-h4.c |4 +
 arch/arm/mach-omap2/board-ldp.c|   10 ++-
 arch/arm/mach-omap2/board-overo.c  |7 ++
 arch/arm/plat-omap/include/mach/board-2430sdp.h|   41 ---
 arch/arm/plat-omap/include/mach/board-apollon.h|   46 
 arch/arm/plat-omap/include/mach/board-fsample.h|   51 --
 arch/arm/plat-omap/include/mach/board-h4.h |   38 --
 arch/arm/plat-omap/include/mach/board-innovator.h  |   52 --
 arch/arm/plat-omap/include/mach/board-ldp.h|   39 ---
 arch/arm/plat-omap/include/mach/board-nokia.h  |   54 ---
 .../arm/plat-omap/include/mach/board-omap3beagle.h |   33 -
 arch/arm/plat-omap/include/mach/board-osk.h|   47 -
 arch/arm/plat-omap/include/mach/board-overo.h  |   26 ---
 arch/arm/plat-omap/include/mach/board-palmte.h |   32 -
 arch/arm/plat-omap/include/mach/board-palmtt.h |   23 --
 arch/arm/plat-omap/include/mach/board-palmz71.h|   26 ---
 arch/arm/plat-omap/include/mach/board-perseus2.h   |   39 ---
 arch/arm/plat-omap/include/mach/board-voiceblue.h  |1 
 arch/arm/plat-omap/include/mach/board.h|3 -
 arch/arm/plat-omap/include/mach/hardware.h |   74 
 arch/arm/plat-omap/include/mach/system.h   |2 +
 37 files changed, 126 insertions(+), 645 deletions(-)
 rename arch/arm/{plat-omap/include/mach/board-h2.h = mach-omap1/board-h2.h} 
(90%)
 rename arch/arm/{plat-omap/include/mach/board-h3.h = mach-omap1/board-h3.h} 
(90%)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-2430sdp.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-apollon.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-fsample.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-h4.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-innovator.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-ldp.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-nokia.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-omap3beagle.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-osk.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-overo.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmte.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmtt.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmz71.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-perseus2.h

-- 
Signature
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/13] ARM: OMAP: No need to include board-perseus2.h or board-fsample.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move defines to the board file and remove the now
unnecessary headers.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-fsample.c  |   34 ++-
 arch/arm/plat-omap/include/mach/board-fsample.h  |   51 --
 arch/arm/plat-omap/include/mach/board-perseus2.h |   39 -
 arch/arm/plat-omap/include/mach/hardware.h   |8 ---
 4 files changed, 33 insertions(+), 99 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-fsample.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-perseus2.h

diff --git a/arch/arm/mach-omap1/board-fsample.c 
b/arch/arm/mach-omap1/board-fsample.c
index 3030829..19e0e92 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -34,7 +34,39 @@
 #include mach/keypad.h
 #include mach/common.h
 #include mach/board.h
-#include mach/board-fsample.h
+
+/* fsample is pretty close to p2-sample */
+
+#define fsample_cpld_read(reg) __raw_readb(reg)
+#define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
+
+#define FSAMPLE_CPLD_BASE0xE810
+#define FSAMPLE_CPLD_SIZESZ_4K
+#define FSAMPLE_CPLD_START   0x0508
+
+#define FSAMPLE_CPLD_REG_A   (FSAMPLE_CPLD_BASE + 0x00)
+#define FSAMPLE_CPLD_SWITCH  (FSAMPLE_CPLD_BASE + 0x02)
+#define FSAMPLE_CPLD_UART(FSAMPLE_CPLD_BASE + 0x02)
+#define FSAMPLE_CPLD_REG_B   (FSAMPLE_CPLD_BASE + 0x04)
+#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
+#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
+
+#define FSAMPLE_CPLD_BIT_BT_RESET 0
+#define FSAMPLE_CPLD_BIT_LCD_RESET1
+#define FSAMPLE_CPLD_BIT_CAM_PWDN 2
+#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE   3
+#define FSAMPLE_CPLD_BIT_SD_MMC_EN4
+#define FSAMPLE_CPLD_BIT_aGPS_PWREN   5
+#define FSAMPLE_CPLD_BIT_BACKLIGHT6
+#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET7
+#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N8
+#define FSAMPLE_CPLD_BIT_OTG_RESET9
+
+#define fsample_cpld_set(bit) \
+fsample_cpld_writebit)  15)  4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
+
+#define fsample_cpld_clear(bit) \
+fsample_cpld_write(0xf0 | ((bit)  15), FSAMPLE_CPLD_SET_CLR)
 
 static int fsample_keymap[] = {
KEY(0,0,KEY_UP),
diff --git a/arch/arm/plat-omap/include/mach/board-fsample.h 
b/arch/arm/plat-omap/include/mach/board-fsample.h
deleted file mode 100644
index cb3c5ae..000
--- a/arch/arm/plat-omap/include/mach/board-fsample.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-fsample.h
- *
- * Board-specific goodies for TI F-Sample.
- *
- * Copyright (C) 2006 Google, Inc.
- * Author: Brian Swetland swetl...@google.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_OMAP_FSAMPLE_H
-#define __ASM_ARCH_OMAP_FSAMPLE_H
-
-/* fsample is pretty close to p2-sample */
-#include mach/board-perseus2.h
-
-#define fsample_cpld_read(reg) __raw_readb(reg)
-#define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
-
-#define FSAMPLE_CPLD_BASE0xE810
-#define FSAMPLE_CPLD_SIZESZ_4K
-#define FSAMPLE_CPLD_START   0x0508
-
-#define FSAMPLE_CPLD_REG_A   (FSAMPLE_CPLD_BASE + 0x00)
-#define FSAMPLE_CPLD_SWITCH  (FSAMPLE_CPLD_BASE + 0x02)
-#define FSAMPLE_CPLD_UART(FSAMPLE_CPLD_BASE + 0x02)
-#define FSAMPLE_CPLD_REG_B   (FSAMPLE_CPLD_BASE + 0x04)
-#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
-#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
-
-#define FSAMPLE_CPLD_BIT_BT_RESET 0
-#define FSAMPLE_CPLD_BIT_LCD_RESET1
-#define FSAMPLE_CPLD_BIT_CAM_PWDN 2
-#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE   3
-#define FSAMPLE_CPLD_BIT_SD_MMC_EN4
-#define FSAMPLE_CPLD_BIT_aGPS_PWREN   5
-#define FSAMPLE_CPLD_BIT_BACKLIGHT6
-#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET7
-#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N8
-#define FSAMPLE_CPLD_BIT_OTG_RESET9
-
-#define fsample_cpld_set(bit) \
-fsample_cpld_writebit)  15)  4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
-
-#define fsample_cpld_clear(bit) \
-fsample_cpld_write(0xf0 | ((bit)  15), FSAMPLE_CPLD_SET_CLR)
-
-#endif
diff --git a/arch/arm/plat-omap/include/mach/board-perseus2.h 
b/arch/arm/plat-omap/include/mach/board-perseus2.h
deleted file mode 100644
index c06c3d7..000
--- a/arch/arm/plat-omap/include/mach/board-perseus2.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  arch/arm/plat-omap/include/mach/board-perseus2.h
- *
- *  Copyright 2003 by Texas Instruments Incorporated
- *OMAP730 / Perseus2 support by Jean Pihet
- *
- * Copyright (C) 2001 RidgeRun, Inc. (http://www.ridgerun.com)
- * Author: RidgeRun, Inc.
- *
- * 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 

[PATCH 02/13] ARM: OMAP: No need to include board-h2.h from hardware.h

2009-02-26 Thread Tony Lindgren
Also move board-h2.h to mach-omap1.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-h2-mmc.c |2 ++
 arch/arm/mach-omap1/board-h2.c |5 +
 arch/arm/mach-omap1/board-h2.h |5 +
 arch/arm/plat-omap/include/mach/hardware.h |4 
 4 files changed, 8 insertions(+), 8 deletions(-)
 rename arch/arm/{plat-omap/include/mach/board-h2.h = mach-omap1/board-h2.h} 
(90%)

diff --git a/arch/arm/mach-omap1/board-h2-mmc.c 
b/arch/arm/mach-omap1/board-h2-mmc.c
index 409fa56..44d4a96 100644
--- a/arch/arm/mach-omap1/board-h2-mmc.c
+++ b/arch/arm/mach-omap1/board-h2-mmc.c
@@ -19,6 +19,8 @@
 #include mach/mmc.h
 #include mach/gpio.h
 
+#include board-h2.h
+
 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 0d784a7..b31b6d9 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -46,6 +46,11 @@
 #include mach/keypad.h
 #include mach/common.h
 
+#include board-h2.h
+
+/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
+#define OMAP1610_ETHR_START0x04000300
+
 static int h2_keymap[] = {
KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT),
diff --git a/arch/arm/plat-omap/include/mach/board-h2.h 
b/arch/arm/mach-omap1/board-h2.h
similarity index 90%
rename from arch/arm/plat-omap/include/mach/board-h2.h
rename to arch/arm/mach-omap1/board-h2.h
index 15531c8..315e266 100644
--- a/arch/arm/plat-omap/include/mach/board-h2.h
+++ b/arch/arm/mach-omap1/board-h2.h
@@ -1,5 +1,5 @@
 /*
- * arch/arm/plat-omap/include/mach/board-h2.h
+ * arch/arm/mach-omap1/board-h2.h
  *
  * Hardware definitions for TI OMAP1610 H2 board.
  *
@@ -29,9 +29,6 @@
 #ifndef __ASM_ARCH_OMAP_H2_H
 #define __ASM_ARCH_OMAP_H2_H
 
-/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
-#define OMAP1610_ETHR_START0x04000300
-
 #define H2_TPS_GPIO_BASE   (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
 #  define H2_TPS_GPIO_MMC_PWR_EN   (H2_TPS_GPIO_BASE + 3)
 
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 5b59188..ac4d8d0 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -298,10 +298,6 @@
 #include board-innovator.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_H2
-#include board-h2.h
-#endif
-
 #ifdef CONFIG_MACH_OMAP_H3
 #include board-h3.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 03/13] ARM: OMAP: No need to include board-h3.h from hardware.h

2009-02-26 Thread Tony Lindgren
Also move board-h3.h to mach-omap1.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-h3-mmc.c |2 ++
 arch/arm/mach-omap1/board-h3.c |5 +
 arch/arm/mach-omap1/board-h3.h |5 +
 arch/arm/plat-omap/include/mach/hardware.h |4 
 4 files changed, 8 insertions(+), 8 deletions(-)
 rename arch/arm/{plat-omap/include/mach/board-h3.h = mach-omap1/board-h3.h} 
(90%)

diff --git a/arch/arm/mach-omap1/board-h3-mmc.c 
b/arch/arm/mach-omap1/board-h3-mmc.c
index fdfe793..0d8a3c1 100644
--- a/arch/arm/mach-omap1/board-h3-mmc.c
+++ b/arch/arm/mach-omap1/board-h3-mmc.c
@@ -19,6 +19,8 @@
 #include mach/mmc.h
 #include mach/gpio.h
 
+#include board-h3.h
+
 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
 
 static int mmc_set_power(struct device *dev, int slot, int power_on,
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index bf08b6a..4b872f3 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -50,6 +50,11 @@
 #include mach/dma.h
 #include mach/common.h
 
+#include board-h3.h
+
+/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
+#define OMAP1710_ETHR_START0x04000300
+
 #define H3_TS_GPIO 48
 
 static int h3_keymap[] = {
diff --git a/arch/arm/plat-omap/include/mach/board-h3.h 
b/arch/arm/mach-omap1/board-h3.h
similarity index 90%
rename from arch/arm/plat-omap/include/mach/board-h3.h
rename to arch/arm/mach-omap1/board-h3.h
index 1888326..78de535 100644
--- a/arch/arm/plat-omap/include/mach/board-h3.h
+++ b/arch/arm/mach-omap1/board-h3.h
@@ -1,5 +1,5 @@
 /*
- * arch/arm/plat-omap/include/mach/board-h3.h
+ * arch/arm/mach-omap1/board-h3.h
  *
  * Copyright (C) 2001 RidgeRun, Inc.
  * Copyright (C) 2004 Texas Instruments, Inc.
@@ -27,9 +27,6 @@
 #ifndef __ASM_ARCH_OMAP_H3_H
 #define __ASM_ARCH_OMAP_H3_H
 
-/* In OMAP1710 H3 the Ethernet is directly connected to CS1 */
-#define OMAP1710_ETHR_START0x04000300
-
 #define H3_TPS_GPIO_BASE   (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
 #  define H3_TPS_GPIO_MMC_PWR_EN   (H3_TPS_GPIO_BASE + 4)
 
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index ac4d8d0..040244c 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -298,10 +298,6 @@
 #include board-innovator.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_H3
-#include board-h3.h
-#endif
-
 #ifdef CONFIG_MACH_OMAP_H4
 #include board-h4.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/13] ARM: OMAP: No need to include board-innovator.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the board file and remove the now unnecessary
header file.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-innovator.c |3 +
 arch/arm/plat-omap/include/mach/board-innovator.h |   52 -
 arch/arm/plat-omap/include/mach/hardware.h|4 --
 3 files changed, 3 insertions(+), 56 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-innovator.h

diff --git a/arch/arm/mach-omap1/board-innovator.c 
b/arch/arm/mach-omap1/board-innovator.c
index 071cd02..714a08f 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -39,6 +39,9 @@
 #include mach/common.h
 #include mach/mmc.h
 
+/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
+#define INNOVATOR1610_ETHR_START   0x04000300
+
 static int innovator_keymap[] = {
KEY(0, 0, KEY_F1),
KEY(0, 3, KEY_DOWN),
diff --git a/arch/arm/plat-omap/include/mach/board-innovator.h 
b/arch/arm/plat-omap/include/mach/board-innovator.h
deleted file mode 100644
index 5ae3e79..000
--- a/arch/arm/plat-omap/include/mach/board-innovator.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-innovator.h
- *
- * Copyright (C) 2001 RidgeRun, Inc.
- *
- * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef __ASM_ARCH_OMAP_INNOVATOR_H
-#define __ASM_ARCH_OMAP_INNOVATOR_H
-
-#if defined (CONFIG_ARCH_OMAP15XX)
-
-#ifndef OMAP_SDRAM_DEVICE
-#define OMAP_SDRAM_DEVICE  D256M_1X16_4B
-#endif
-
-#define OMAP1510P1_IMIF_PRI_VALUE  0x00
-#define OMAP1510P1_EMIFS_PRI_VALUE 0x00
-#define OMAP1510P1_EMIFF_PRI_VALUE 0x00
-
-#ifndef __ASSEMBLY__
-void fpga_write(unsigned char val, int reg);
-unsigned char fpga_read(int reg);
-#endif
-
-#endif /* CONFIG_ARCH_OMAP15XX */
-
-#if defined (CONFIG_ARCH_OMAP16XX)
-
-/* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */
-#define INNOVATOR1610_ETHR_START   0x04000300
-
-#endif /* CONFIG_ARCH_OMAP1610 */
-#endif /* __ASM_ARCH_OMAP_INNOVATOR_H */
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 040244c..0b1b91f 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -294,10 +294,6 @@
  * ---
  */
 
-#ifdef CONFIG_MACH_OMAP_INNOVATOR
-#include board-innovator.h
-#endif
-
 #ifdef CONFIG_MACH_OMAP_H4
 #include board-h4.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/13] ARM: OMAP: No need to include board-osk.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the board file and remove the now unnecessary
header file.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-osk.c |   14 
 arch/arm/plat-omap/include/mach/board-osk.h |   47 ---
 arch/arm/plat-omap/include/mach/hardware.h  |4 --
 3 files changed, 14 insertions(+), 51 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-osk.h

diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 1a16ecb..9c4cac2 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -52,6 +52,20 @@
 #include mach/tc.h
 #include mach/common.h
 
+/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
+#define OMAP_OSK_ETHR_START0x04800300
+
+/* TPS65010 has four GPIOs.  nPG and LED2 can be treated like GPIOs with
+ * alternate pin configurations for hardware-controlled blinking.
+ */
+#define OSK_TPS_GPIO_BASE  (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
+#  define OSK_TPS_GPIO_USB_PWR_EN  (OSK_TPS_GPIO_BASE + 0)
+#  define OSK_TPS_GPIO_LED_D3  (OSK_TPS_GPIO_BASE + 1)
+#  define OSK_TPS_GPIO_LAN_RESET   (OSK_TPS_GPIO_BASE + 2)
+#  define OSK_TPS_GPIO_DSP_PWR_EN  (OSK_TPS_GPIO_BASE + 3)
+#  define OSK_TPS_GPIO_LED_D9  (OSK_TPS_GPIO_BASE + 4)
+#  define OSK_TPS_GPIO_LED_D2  (OSK_TPS_GPIO_BASE + 5)
+
 static struct mtd_partition osk_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
{
diff --git a/arch/arm/plat-omap/include/mach/board-osk.h 
b/arch/arm/plat-omap/include/mach/board-osk.h
deleted file mode 100644
index 3850cb1..000
--- a/arch/arm/plat-omap/include/mach/board-osk.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-osk.h
- *
- * Hardware definitions for TI OMAP5912 OSK board.
- *
- * Written by Dirk Behme dirk.be...@de.bosch.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_OSK_H
-#define __ASM_ARCH_OMAP_OSK_H
-
-/* At OMAP5912 OSK the Ethernet is directly connected to CS1 */
-#define OMAP_OSK_ETHR_START0x04800300
-
-/* TPS65010 has four GPIOs.  nPG and LED2 can be treated like GPIOs with
- * alternate pin configurations for hardware-controlled blinking.
- */
-#define OSK_TPS_GPIO_BASE  (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)
-#  define OSK_TPS_GPIO_USB_PWR_EN  (OSK_TPS_GPIO_BASE + 0)
-#  define OSK_TPS_GPIO_LED_D3  (OSK_TPS_GPIO_BASE + 1)
-#  define OSK_TPS_GPIO_LAN_RESET   (OSK_TPS_GPIO_BASE + 2)
-#  define OSK_TPS_GPIO_DSP_PWR_EN  (OSK_TPS_GPIO_BASE + 3)
-#  define OSK_TPS_GPIO_LED_D9  (OSK_TPS_GPIO_BASE + 4)
-#  define OSK_TPS_GPIO_LED_D2  (OSK_TPS_GPIO_BASE + 5)
-
-#endif /*  __ASM_ARCH_OMAP_OSK_H */
-
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 0b1b91f..201a8fa 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -314,10 +314,6 @@
 #include board-apollon.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_OSK
-#include board-osk.h
-#endif
-
 #ifdef CONFIG_MACH_VOICEBLUE
 #include board-voiceblue.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/13] ARM: OMAP: No need to include board-palm*.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header files.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap1/board-palmte.c  |   15 +++
 arch/arm/mach-omap1/board-palmtt.c  |7 +
 arch/arm/mach-omap1/board-palmz71.c |   10 +++
 arch/arm/mach-omap1/board-sx1-mmc.c |1 +
 arch/arm/mach-omap1/board-sx1.c |1 +
 arch/arm/plat-omap/include/mach/board-palmte.h  |   32 ---
 arch/arm/plat-omap/include/mach/board-palmtt.h  |   23 -
 arch/arm/plat-omap/include/mach/board-palmz71.h |   26 ---
 arch/arm/plat-omap/include/mach/hardware.h  |   12 -
 9 files changed, 34 insertions(+), 93 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmte.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmtt.h
 delete mode 100644 arch/arm/plat-omap/include/mach/board-palmz71.h

diff --git a/arch/arm/mach-omap1/board-palmte.c 
b/arch/arm/mach-omap1/board-palmte.c
index 99f2b43..55d524b 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -43,6 +43,21 @@
 #include mach/keypad.h
 #include mach/common.h
 
+#define PALMTE_USBDETECT_GPIO  0
+#define PALMTE_USB_OR_DC_GPIO  1
+#define PALMTE_TSC_GPIO4
+#define PALMTE_PINTDAV_GPIO6
+#define PALMTE_MMC_WP_GPIO 8
+#define PALMTE_MMC_POWER_GPIO  9
+#define PALMTE_HDQ_GPIO11
+#define PALMTE_HEADPHONES_GPIO 14
+#define PALMTE_SPEAKER_GPIO15
+#define PALMTE_DC_GPIO OMAP_MPUIO(2)
+#define PALMTE_MMC_SWITCH_GPIO OMAP_MPUIO(4)
+#define PALMTE_MMC1_GPIO   OMAP_MPUIO(6)
+#define PALMTE_MMC2_GPIO   OMAP_MPUIO(7)
+#define PALMTE_MMC3_GPIO   OMAP_MPUIO(11)
+
 static void __init omap_palmte_init_irq(void)
 {
omap1_init_common_hw();
diff --git a/arch/arm/mach-omap1/board-palmtt.c 
b/arch/arm/mach-omap1/board-palmtt.c
index 1cbc127..9dc9d79 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -43,6 +43,13 @@
 #include linux/spi/spi.h
 #include linux/spi/ads7846.h
 
+#define PALMTT_USBDETECT_GPIO  0
+#define PALMTT_CABLE_GPIO  1
+#define PALMTT_LED_GPIO3
+#define PALMTT_PENIRQ_GPIO 6
+#define PALMTT_MMC_WP_GPIO 8
+#define PALMTT_HDQ_GPIO11
+
 static int palmtt_keymap[] = {
KEY(0, 0, KEY_ESC),
KEY(0, 1, KEY_SPACE),
diff --git a/arch/arm/mach-omap1/board-palmz71.c 
b/arch/arm/mach-omap1/board-palmz71.c
index baf5efb..a2f99a4 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -46,6 +46,16 @@
 #include linux/spi/spi.h
 #include linux/spi/ads7846.h
 
+#define PALMZ71_USBDETECT_GPIO 0
+#define PALMZ71_PENIRQ_GPIO6
+#define PALMZ71_MMC_WP_GPIO8
+#define PALMZ71_HDQ_GPIO   11
+
+#define PALMZ71_HOTSYNC_GPIO   OMAP_MPUIO(1)
+#define PALMZ71_CABLE_GPIO OMAP_MPUIO(2)
+#define PALMZ71_SLIDER_GPIOOMAP_MPUIO(3)
+#define PALMZ71_MMC_IN_GPIOOMAP_MPUIO(4)
+
 static void __init
 omap_palmz71_init_irq(void)
 {
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c 
b/arch/arm/mach-omap1/board-sx1-mmc.c
index 66a4d7d..58a46e4 100644
--- a/arch/arm/mach-omap1/board-sx1-mmc.c
+++ b/arch/arm/mach-omap1/board-sx1-mmc.c
@@ -17,6 +17,7 @@
 #include mach/hardware.h
 #include mach/mmc.h
 #include mach/gpio.h
+#include mach/board-sx1.h
 
 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
 
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 28c76a1..ab277d4 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -41,6 +41,7 @@
 #include mach/board.h
 #include mach/common.h
 #include mach/keypad.h
+#include mach/board-sx1.h
 
 /* Write to I2C device */
 int sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value)
diff --git a/arch/arm/plat-omap/include/mach/board-palmte.h 
b/arch/arm/plat-omap/include/mach/board-palmte.h
deleted file mode 100644
index 6906cde..000
--- a/arch/arm/plat-omap/include/mach/board-palmte.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-palmte.h
- *
- * Hardware definitions for the Palm Tungsten E device.
- *
- * Maintainters :  http://palmtelinux.sf.net
- * palmtelinux-developp...@lists.sf.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __OMAP_BOARD_PALMTE_H
-#define __OMAP_BOARD_PALMTE_H
-
-#define PALMTE_USBDETECT_GPIO  0
-#define PALMTE_USB_OR_DC_GPIO  1
-#define PALMTE_TSC_GPIO4
-#define PALMTE_PINTDAV_GPIO6
-#define PALMTE_MMC_WP_GPIO 8
-#define PALMTE_MMC_POWER_GPIO  9
-#define PALMTE_HDQ_GPIO11
-#define PALMTE_HEADPHONES_GPIO 14
-#define PALMTE_SPEAKER_GPIO15

[PATCH 07/13] ARM: OMAP: No need to include board-omap2430sdp.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
SDP2430_ETHR_GPIO_IRQ to SDP2430_ETHR_GPIO_IRQ.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-2430sdp.c |   13 ---
 arch/arm/plat-omap/include/mach/board-2430sdp.h |   41 ---
 arch/arm/plat-omap/include/mach/hardware.h  |4 --
 3 files changed, 8 insertions(+), 50 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-2430sdp.h

diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 83fa372..c8abe6a 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -38,9 +38,12 @@
 
 #include mmc-twl4030.h
 
+#define SDP2430_CS0_BASE   0x0400
 #defineSDP2430_FLASH_CS0
 #defineSDP2430_SMC91X_CS   5
 
+#define SDP2430_ETHR_GPIO_IRQ  149
+
 static struct mtd_partition sdp2430_partitions[] = {
/* bootloader (U-Boot, etc) in first sector */
{
@@ -102,8 +105,8 @@ static struct resource sdp2430_smc91x_resources[] = {
.flags  = IORESOURCE_MEM,
},
[1] = {
-   .start  = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
-   .end= OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
+   .start  = OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
+   .end= OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
.flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},
 };
@@ -170,13 +173,13 @@ static inline void __init sdp2430_init_smc91x(void)
sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f;
udelay(100);
 
-   if (gpio_request(OMAP24XX_ETHR_GPIO_IRQ, SMC91x irq)  0) {
+   if (gpio_request(SDP2430_ETHR_GPIO_IRQ, SMC91x irq)  0) {
printk(KERN_ERR Failed to request GPIO%d for smc91x IRQ\n,
-   OMAP24XX_ETHR_GPIO_IRQ);
+   SDP2430_ETHR_GPIO_IRQ);
gpmc_cs_free(eth_cs);
goto out;
}
-   gpio_direction_input(OMAP24XX_ETHR_GPIO_IRQ);
+   gpio_direction_input(SDP2430_ETHR_GPIO_IRQ);
 
 out:
clk_disable(gpmc_fck);
diff --git a/arch/arm/plat-omap/include/mach/board-2430sdp.h 
b/arch/arm/plat-omap/include/mach/board-2430sdp.h
deleted file mode 100644
index 10d449e..000
--- a/arch/arm/plat-omap/include/mach/board-2430sdp.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-2430sdp.h
- *
- * Hardware definitions for TI OMAP2430 SDP board.
- *
- * Based on board-h4.h by Dirk Behme dirk.be...@de.bosch.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_2430SDP_H
-#define __ASM_ARCH_OMAP_2430SDP_H
-
-/* Placeholder for 2430SDP specific defines */
-#define OMAP24XX_ETHR_START0x08000300
-#define OMAP24XX_ETHR_GPIO_IRQ 149
-#define SDP2430_CS0_BASE   0x0400
-
-/* Function prototypes */
-extern void sdp2430_flash_init(void);
-extern void sdp2430_usb_init(void);
-
-#endif /* __ASM_ARCH_OMAP_2430SDP_H */
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 194ed49..346a5c7 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -298,10 +298,6 @@
 #include board-h4.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_2430SDP
-#include board-2430sdp.h
-#endif
-
 #ifdef CONFIG_MACH_OMAP3_BEAGLE
 #include board-omap3beagle.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 08/13] ARM: OMAP: No need to include board-apollon.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-apollon.c |1 +
 arch/arm/plat-omap/include/mach/board-apollon.h |   46 ---
 arch/arm/plat-omap/include/mach/hardware.h  |4 --
 3 files changed, 1 insertions(+), 50 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-apollon.h

diff --git a/arch/arm/mach-omap2/board-apollon.c 
b/arch/arm/mach-omap2/board-apollon.c
index 0a7b24b..6456124 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -51,6 +51,7 @@
 
 #define APOLLON_FLASH_CS   0
 #define APOLLON_ETH_CS 1
+#define APOLLON_ETHR_GPIO_IRQ  74
 
 static struct mtd_partition apollon_partitions[] = {
{
diff --git a/arch/arm/plat-omap/include/mach/board-apollon.h 
b/arch/arm/plat-omap/include/mach/board-apollon.h
deleted file mode 100644
index 61bd5e8..000
--- a/arch/arm/plat-omap/include/mach/board-apollon.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-apollon.h
- *
- * Hardware definitions for Samsung OMAP24XX Apollon board.
- *
- * Initial creation by Kyungmin Park kyungmin.p...@samsung.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_APOLLON_H
-#define __ASM_ARCH_OMAP_APOLLON_H
-
-#include mach/cpu.h
-
-extern void apollon_mmc_init(void);
-
-static inline int apollon_plus(void)
-{
-   /* The apollon plus has IDCODE revision 5 */
-   return omap_rev()  0xc0;
-}
-
-/* Placeholder for APOLLON specific defines */
-#define APOLLON_ETHR_GPIO_IRQ  74
-
-#endif /*  __ASM_ARCH_OMAP_APOLLON_H */
-
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 346a5c7..26f14f7 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -306,10 +306,6 @@
 #include board-ldp.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_APOLLON
-#include board-apollon.h
-#endif
-
 #ifdef CONFIG_MACH_VOICEBLUE
 #include board-voiceblue.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch/rfc 2.6.29-rc6 2/2] regulator: twl4030 voltage enumeration (v2)

2009-02-26 Thread David Brownell
On Thursday 26 February 2009, Liam Girdwood wrote:
  
  Note that the twl4030 regulator patch referred to will need a
  minor patch to work with the -next tree, because of interface
  change in the regulator framework.
  
   drivers/regulator/twl4030-regulator.c |   62 
  +++-
   1 file changed, 23 insertions(+), 39 deletions(-)
 
 Applied.

 and here's that minor patch.

== CUT HERE
From: David Brownell dbrown...@users.sourceforge.net

Catch up the twl4030 regulator driver to the regulator
interface change adding another parameter.  Also, fix
some comments, and take this opportunity to shrink the
associated per-regulator memory usage by a word.

Signed-off-by: David Brownell dbrown...@users.sourceforge.net
---
 drivers/regulator/twl4030-regulator.c |   17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

--- a/drivers/regulator/twl4030-regulator.c
+++ b/drivers/regulator/twl4030-regulator.c
@@ -36,13 +36,13 @@ struct twlreg_info {
/* twl4030 resource ID, for resource control state machine */
u8  id;
 
+   /* FIXED_LDO voltage */
+   u8  deciV;
+
/* voltage in mV = table[VSEL]; table_len must be a power-of-two */
u8  table_len;
const u16   *table;
 
-   /* chip constraints on regulator behavior */
-   u16 min_mV;
-
/* used by regulator core */
struct regulator_desc   desc;
 };
@@ -329,14 +329,14 @@ static int twl4030fixed_list_voltage(str
 {
struct twlreg_info  *info = rdev_get_drvdata(rdev);
 
-   return info-min_mV * 1000;
+   return info-deciV * 100 * 1000;
 }
 
 static int twl4030fixed_get_voltage(struct regulator_dev *rdev)
 {
struct twlreg_info  *info = rdev_get_drvdata(rdev);
 
-   return info-min_mV * 1000;
+   return info-deciV * 100 * 1000;
 }
 
 static struct regulator_ops twl4030fixed_ops = {
@@ -373,7 +373,7 @@ static struct regulator_ops twl4030fixed
 #define TWL_FIXED_LDO(label, offset, mVolts, num) { \
.base = offset, \
.id = num, \
-   .min_mV = mVolts, \
+   .deciV = mVolts / 100 , \
.desc = { \
.name = #label, \
.id = TWL4030_REG_##label, \
@@ -385,7 +385,7 @@ static struct regulator_ops twl4030fixed
}
 
 /*
- * We list regulators here if systems need some level of
+ * We expose regulators here if systems need some level of
  * software control over them after boot.
  */
 static struct twlreg_info twl4030_regs[] = {
@@ -439,6 +439,7 @@ static int twl4030reg_probe(struct platf
 
/* Constrain board-specific capabilities according to what
 * this driver and the chip itself can actually do.
+* (Regulator core now does this for voltage constraints.)
 */
c = initdata-constraints;
c-valid_modes_mask = REGULATOR_MODE_NORMAL | REGULATOR_MODE_STANDBY;
@@ -446,7 +447,7 @@ static int twl4030reg_probe(struct platf
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS;
 
-   rdev = regulator_register(info-desc, pdev-dev, info);
+   rdev = regulator_register(info-desc, pdev-dev, initdata, info);
if (IS_ERR(rdev)) {
dev_err(pdev-dev, can't register %s, %ld\n,
info-desc.name, PTR_ERR(rdev));



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/13] ARM: OMAP: No need to include board-h4.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
OMAP24XX_ETHR_GPIO_IRQ to H4_ETHR_GPIO_IRQ.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-h4.c |4 ++-
 arch/arm/plat-omap/include/mach/board-h4.h |   38 
 arch/arm/plat-omap/include/mach/hardware.h |4 ---
 3 files changed, 3 insertions(+), 43 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-h4.h

diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 5e9b146..7122697 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -47,6 +47,8 @@
 #define H4_FLASH_CS0
 #define H4_SMC91X_CS   1
 
+#define H4_ETHR_GPIO_IRQ   92
+
 static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
 static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
 
@@ -341,7 +343,7 @@ static inline void __init h4_init_debug(void)
udelay(100);
 
omap_cfg_reg(M15_24XX_GPIO92);
-   if (debug_card_init(cs_mem_base, OMAP24XX_ETHR_GPIO_IRQ)  0)
+   if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ)  0)
gpmc_cs_free(eth_cs);
 
 out:
diff --git a/arch/arm/plat-omap/include/mach/board-h4.h 
b/arch/arm/plat-omap/include/mach/board-h4.h
deleted file mode 100644
index 7c3fa0f..000
--- a/arch/arm/plat-omap/include/mach/board-h4.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-h4.h
- *
- * Hardware definitions for TI OMAP2420 H4 board.
- *
- * Initial creation by Dirk Behme dirk.be...@de.bosch.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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_H4_H
-#define __ASM_ARCH_OMAP_H4_H
-
-/* MMC Prototypes */
-extern void h4_mmc_init(void);
-
-/* Placeholder for H4 specific defines */
-#define OMAP24XX_ETHR_GPIO_IRQ 92
-#endif /*  __ASM_ARCH_OMAP_H4_H */
-
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 26f14f7..85f02b6 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -294,10 +294,6 @@
  * ---
  */
 
-#ifdef CONFIG_MACH_OMAP_H4
-#include board-h4.h
-#endif
-
 #ifdef CONFIG_MACH_OMAP3_BEAGLE
 #include board-omap3beagle.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/13] ARM: OMAP: No need to include board-ldp.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file. Also rename
OMAP34XX_ETHR_START to LDP_ETHR_START.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-ldp.c |   10 ---
 arch/arm/plat-omap/include/mach/board-ldp.h |   39 ---
 arch/arm/plat-omap/include/mach/hardware.h  |4 ---
 3 files changed, 6 insertions(+), 47 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-ldp.h

diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index f6a1345..33112a2 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -28,7 +28,6 @@
 #include asm/mach/arch.h
 #include asm/mach/map.h
 
-#include mach/board-ldp.h
 #include mach/mcspi.h
 #include mach/gpio.h
 #include mach/board.h
@@ -41,12 +40,15 @@
 
 #include mmc-twl4030.h
 
-#define SDP3430_SMC91X_CS  3
+#define LDP_SMC911X_CS 1
+#define LDP_SMC911X_GPIO   152
+#define DEBUG_BASE 0x0800
+#define LDP_ETHR_START DEBUG_BASE
 
 static struct resource ldp_smc911x_resources[] = {
[0] = {
-   .start  = OMAP34XX_ETHR_START,
-   .end= OMAP34XX_ETHR_START + SZ_4K,
+   .start  = LDP_ETHR_START,
+   .end= LDP_ETHR_START + SZ_4K,
.flags  = IORESOURCE_MEM,
},
[1] = {
diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h 
b/arch/arm/plat-omap/include/mach/board-ldp.h
deleted file mode 100644
index f233996..000
--- a/arch/arm/plat-omap/include/mach/board-ldp.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * arch/arm/plat-omap/include/mach/board-ldp.h
- *
- * Hardware definitions for TI OMAP3 LDP.
- *
- * Copyright (C) 2008 Texas Instruments Inc.
- *
- * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
- * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OMAP_LDP_H
-#define __ASM_ARCH_OMAP_LDP_H
-
-extern void twl4030_bci_battery_init(void);
-
-#define TWL4030_IRQNUM INT_34XX_SYS_NIRQ
-#define LDP_SMC911X_CS 1
-#define LDP_SMC911X_GPIO   152
-#define DEBUG_BASE 0x0800
-#define OMAP34XX_ETHR_STARTDEBUG_BASE
-#endif /* __ASM_ARCH_OMAP_LDP_H */
diff --git a/arch/arm/plat-omap/include/mach/hardware.h 
b/arch/arm/plat-omap/include/mach/hardware.h
index 85f02b6..bba9498 100644
--- a/arch/arm/plat-omap/include/mach/hardware.h
+++ b/arch/arm/plat-omap/include/mach/hardware.h
@@ -298,10 +298,6 @@
 #include board-omap3beagle.h
 #endif
 
-#ifdef CONFIG_MACH_OMAP_LDP
-#include board-ldp.h
-#endif
-
 #ifdef CONFIG_MACH_VOICEBLUE
 #include board-voiceblue.h
 #endif

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 11/13] ARM: OMAP: No need to include board-overo.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/mach-omap2/board-overo.c |7 ++-
 arch/arm/plat-omap/include/mach/board-overo.h |   26 -
 2 files changed, 6 insertions(+), 27 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-overo.h

diff --git a/arch/arm/mach-omap2/board-overo.c 
b/arch/arm/mach-omap2/board-overo.c
index 82b3dc5..b92313c 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -37,7 +37,6 @@
 #include asm/mach/flash.h
 #include asm/mach/map.h
 
-#include mach/board-overo.h
 #include mach/board.h
 #include mach/common.h
 #include mach/gpio.h
@@ -47,6 +46,12 @@
 
 #include mmc-twl4030.h
 
+#define OVERO_GPIO_BT_XGATE15
+#define OVERO_GPIO_W2W_NRESET  16
+#define OVERO_GPIO_BT_NRESET   164
+#define OVERO_GPIO_USBH_CPEN   168
+#define OVERO_GPIO_USBH_NRESET 183
+
 #define NAND_BLOCK_SIZE SZ_128K
 #define GPMC_CS0_BASE  0x60
 #define GPMC_CS_SIZE   0x30
diff --git a/arch/arm/plat-omap/include/mach/board-overo.h 
b/arch/arm/plat-omap/include/mach/board-overo.h
deleted file mode 100644
index 7ecae66..000
--- a/arch/arm/plat-omap/include/mach/board-overo.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * board-overo.h (Gumstix Overo)
- *
- * Initial code: Steve Sakoman st...@sakoman.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.
- *
- * 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.,
- * 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __ASM_ARCH_OVERO_H
-#define __ASM_ARCH_OVERO_H
-
-#define OVERO_GPIO_BT_XGATE15
-#define OVERO_GPIO_W2W_NRESET  16
-#define OVERO_GPIO_BT_NRESET   164
-#define OVERO_GPIO_USBH_CPEN   168
-#define OVERO_GPIO_USBH_NRESET 183
-
-#endif /* ASM_ARCH_OVERO_H */
-

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 12/13] ARM: OMAP: No need to include board-nokia.h from hardware.h

2009-02-26 Thread Tony Lindgren
Move the defines to the associated board file and remove
the now unnecessary header file.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/plat-omap/include/mach/board-nokia.h |   54 -
 arch/arm/plat-omap/include/mach/board.h   |3 -
 2 files changed, 0 insertions(+), 57 deletions(-)
 delete mode 100644 arch/arm/plat-omap/include/mach/board-nokia.h

diff --git a/arch/arm/plat-omap/include/mach/board-nokia.h 
b/arch/arm/plat-omap/include/mach/board-nokia.h
deleted file mode 100644
index 2abbe00..000
--- a/arch/arm/plat-omap/include/mach/board-nokia.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  arch/arm/plat-omap/include/mach/board-nokia.h
- *
- *  Information structures for Nokia-specific board config data
- *
- *  Copyright (C) 2005 Nokia Corporation
- */
-
-#ifndef _OMAP_BOARD_NOKIA_H
-#define _OMAP_BOARD_NOKIA_H
-
-#include linux/types.h
-
-#define OMAP_TAG_NOKIA_BT  0x4e01
-#define OMAP_TAG_WLAN_CX3110X  0x4e02
-#define OMAP_TAG_CBUS  0x4e03
-#define OMAP_TAG_EM_ASIC_BB5   0x4e04
-
-
-#define BT_CHIP_CSR1
-#define BT_CHIP_TI 2
-
-#define BT_SYSCLK_12   1
-#define BT_SYSCLK_38_4 2
-
-struct omap_bluetooth_config {
-   u8chip_type;
-   u8bt_wakeup_gpio;
-   u8host_wakeup_gpio;
-   u8reset_gpio;
-   u8bt_uart;
-   u8bd_addr[6];
-   u8bt_sysclk;
-};
-
-struct omap_wlan_cx3110x_config {
-   u8  chip_type;
-   s16 power_gpio;
-   s16 irq_gpio;
-   s16 spi_cs_gpio;
-};
-
-struct omap_cbus_config {
-   s16 clk_gpio;
-   s16 dat_gpio;
-   s16 sel_gpio;
-};
-
-struct omap_em_asic_bb5_config {
-   s16 retu_irq_gpio;
-   s16 tahvo_irq_gpio;
-};
-
-#endif
diff --git a/arch/arm/plat-omap/include/mach/board.h 
b/arch/arm/plat-omap/include/mach/board.h
index 9466772..4a0afd2 100644
--- a/arch/arm/plat-omap/include/mach/board.h
+++ b/arch/arm/plat-omap/include/mach/board.h
@@ -133,9 +133,6 @@ struct omap_version_config {
char version[12];
 };
 
-
-#include mach/board-nokia.h
-
 struct omap_board_config_entry {
u16 tag;
u16 len;

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[OMAPZOOM][PATCH] ISP: Add default white balance values to board file.

2009-02-26 Thread Dominic Curran
From: Dominic Curran dcur...@ti.com
Subject: [OMAPZOOM][PATCH] ISP: Add default white balance values to board file.

This patch stores the sensors default white balance coefficient values in the 
board file.
This patch keeps the same coef for MT9P012  OV3640, but changes the 
coefficients 
for the IMX046.
Changing the coefficients for the IMX046 fixes a yellowish tint in the image.

The patch is based on top of the set of patches labeled 'Component Order'.

Signed-off-by: Dominic Curran dcur...@ti.com
---
 arch/arm/mach-omap2/board-3430sdp.c  |   12 
 arch/arm/mach-omap2/board-ldp.c  |4 
 arch/arm/mach-omap2/board-zoom2.c|4 
 drivers/media/video/isp/isp.c|1 +
 drivers/media/video/isp/isp.h|3 +++
 drivers/media/video/isp/isppreview.c |   18 ++
 drivers/media/video/isp/isppreview.h |2 ++
 7 files changed, 44 insertions(+)

Index: omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-3430sdp.c
+++ omapzoom04/arch/arm/mach-omap2/board-3430sdp.c
@@ -660,6 +660,10 @@ static struct isp_interface_config mt9p0
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub = 42,
.raw_fmt_in = ISPCCDC_INPUT_FMT_GR_BG,
+   .wbal.coef0 = 0x23,
+   .wbal.coef1 = 0x20,
+   .wbal.coef2 = 0x20,
+   .wbal.coef3 = 0x30,
.u.par.par_bridge = 0x0,
.u.par.par_clk_pol = 0x0,
 };
@@ -783,6 +787,10 @@ static struct isp_interface_config ov364
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
+   .wbal.coef0 = 0x23,
+   .wbal.coef1 = 0x20,
+   .wbal.coef2 = 0x20,
+   .wbal.coef3 = 0x30,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
@@ -991,6 +999,10 @@ static struct isp_interface_config imx04
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub  = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
+   .wbal.coef0 = 0x23,
+   .wbal.coef1 = 0x20,
+   .wbal.coef2 = 0x20,
+   .wbal.coef3 = 0x39,
.u.csi.crc  = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
Index: omapzoom04/arch/arm/mach-omap2/board-ldp.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-ldp.c
+++ omapzoom04/arch/arm/mach-omap2/board-ldp.c
@@ -625,6 +625,10 @@ static struct isp_interface_config ov364
.wenlog = ISPCCDC_CFG_WENLOG_AND,
.dcsub = OV3640_BLACK_LEVEL_10BIT,
.raw_fmt_in = ISPCCDC_INPUT_FMT_BG_GR,
+   .wbal.coef0 = 0x23,
+   .wbal.coef1 = 0x20,
+   .wbal.coef2 = 0x20,
+   .wbal.coef3 = 0x30,
.u.csi.crc = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
Index: omapzoom04/arch/arm/mach-omap2/board-zoom2.c
===
--- omapzoom04.orig/arch/arm/mach-omap2/board-zoom2.c
+++ omapzoom04/arch/arm/mach-omap2/board-zoom2.c
@@ -371,6 +371,10 @@ static struct isp_interface_config imx04
.wenlog = ISPCCDC_CFG_WENLOG_OR,
.dcsub  = IMX046_BLACK_LEVEL_AVG,
.raw_fmt_in = ISPCCDC_INPUT_FMT_RG_GB,
+   .wbal.coef0 = 0x23,
+   .wbal.coef1 = 0x20,
+   .wbal.coef2 = 0x20,
+   .wbal.coef3 = 0x39,
.u.csi.crc  = 0x0,
.u.csi.mode = 0x0,
.u.csi.edge = 0x0,
Index: omapzoom04/drivers/media/video/isp/isp.c
===
--- omapzoom04.orig/drivers/media/video/isp/isp.c
+++ omapzoom04/drivers/media/video/isp/isp.c
@@ -952,6 +952,7 @@ int isp_configure_interface(struct isp_i
ispccdc_set_wenlog(config-wenlog);
ispccdc_set_dcsub(config-dcsub);
ispccdc_set_crop_offset(config-raw_fmt_in);
+   isppreview_set_whitebalance(config-wbal);
 
return 0;
 }
Index: omapzoom04/drivers/media/video/isp/isp.h
===
--- omapzoom04.orig/drivers/media/video/isp/isp.h
+++ omapzoom04/drivers/media/video/isp/isp.h
@@ -27,6 +27,8 @@
 #include media/videobuf-dma-sg.h
 #include linux/videodev2.h
 
+#include mach/isp_user.h
+
 #include ispmmu.h
 
 #define OMAP_ISP_CCDC  (1  0)
@@ -205,6 +207,7 @@ struct isp_interface_config {
u32 wenlog;
u32 dcsub;
enum ispccdc_raw_fmt raw_fmt_in;
+   struct ispprev_wbal wbal;
union {
struct par {
unsigned par_bridge:2;
Index: omapzoom04/drivers/media/video/isp/isppreview.c
===
--- 

Re: [PATCH 07/13] ARM: OMAP: No need to include board-omap2430sdp.h from hardware.h

2009-02-26 Thread Felipe Balbi
Nothing to do with this patch in particular, but...

On Thu, Feb 26, 2009 at 04:01:15PM -0800, Tony Lindgren wrote:
 @@ -102,8 +105,8 @@ static struct resource sdp2430_smc91x_resources[] = {
   .flags  = IORESOURCE_MEM,
   },
   [1] = {
 - .start  = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
 - .end= OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
 + .start  = OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
 + .end= OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
   .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,

normally we only pass start and this should probably be using
gpio_to_irq(), but for that...

   },
  };
 @@ -170,13 +173,13 @@ static inline void __init sdp2430_init_smc91x(void)
   sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f;
   udelay(100);
  
 - if (gpio_request(OMAP24XX_ETHR_GPIO_IRQ, SMC91x irq)  0) {
 + if (gpio_request(SDP2430_ETHR_GPIO_IRQ, SMC91x irq)  0) {
   printk(KERN_ERR Failed to request GPIO%d for smc91x IRQ\n,
 - OMAP24XX_ETHR_GPIO_IRQ);
 + SDP2430_ETHR_GPIO_IRQ);
   gpmc_cs_free(eth_cs);
   goto out;
   }
 - gpio_direction_input(OMAP24XX_ETHR_GPIO_IRQ);
 + gpio_direction_input(SDP2430_ETHR_GPIO_IRQ);

we should probably add:

sdp2430_scm91x_resources[1].start = gpio_to_irq(OMAP24XX_ETHER_GPIO_IRQ);

here

-- 
balbi
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/13] ARM: OMAP: No need to include board-omap2430sdp.h from hardware.h

2009-02-26 Thread Tony Lindgren
* Felipe Balbi m...@felipebalbi.com [090226 16:14]:
 Nothing to do with this patch in particular, but...
 
 On Thu, Feb 26, 2009 at 04:01:15PM -0800, Tony Lindgren wrote:
  @@ -102,8 +105,8 @@ static struct resource sdp2430_smc91x_resources[] = {
  .flags  = IORESOURCE_MEM,
  },
  [1] = {
  -   .start  = OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
  -   .end= OMAP_GPIO_IRQ(OMAP24XX_ETHR_GPIO_IRQ),
  +   .start  = OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
  +   .end= OMAP_GPIO_IRQ(SDP2430_ETHR_GPIO_IRQ),
  .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
 
 normally we only pass start and this should probably be using
 gpio_to_irq(), but for that...
 
  },
   };
  @@ -170,13 +173,13 @@ static inline void __init sdp2430_init_smc91x(void)
  sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f;
  udelay(100);
   
  -   if (gpio_request(OMAP24XX_ETHR_GPIO_IRQ, SMC91x irq)  0) {
  +   if (gpio_request(SDP2430_ETHR_GPIO_IRQ, SMC91x irq)  0) {
  printk(KERN_ERR Failed to request GPIO%d for smc91x IRQ\n,
  -   OMAP24XX_ETHR_GPIO_IRQ);
  +   SDP2430_ETHR_GPIO_IRQ);
  gpmc_cs_free(eth_cs);
  goto out;
  }
  -   gpio_direction_input(OMAP24XX_ETHR_GPIO_IRQ);
  +   gpio_direction_input(SDP2430_ETHR_GPIO_IRQ);
 
 we should probably add:
 
 sdp2430_scm91x_resources[1].start = gpio_to_irq(OMAP24XX_ETHER_GPIO_IRQ);
 
 here

Yeah. But let's deal with that a bit later as I'm thinking about
having a omap generic smc91x_init() which sets the GPMC timings too.

The problem with the current GPMC timings is that they are not cpufreq
safe as they are not dynamically calculated.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Hello Tomi Valkeinen. I wonder about future work plan for new Display Subsystem Driver.

2009-02-26 Thread InKi Dae
Your patch works fine on my system.
This is good patch.

Do you have plans that you will apply your patch to mainline and updating ?

Thank you.
- Inki Dae-
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 2.6.29-rc3-git 2/2] USB: disable twl4030 USB regulators when cable unplugged

2009-02-26 Thread Kalle Jokiniemi
On Thu, 2009-02-26 at 14:40 -0800, David Brownell wrote:
 On Thursday 26 February 2009, Liam Girdwood wrote:
  On Sun, 2009-02-08 at 10:52 -0800, David Brownell wrote:
   From: Kalle Jokiniemi kalle.jokini...@digia.com
   
   This patch disables LDO regulators VUSB1V5, VUSB1V8, and VUSB3V1
   when the USB cable is unplugged, to eliminate that source of power
   waste.  (Enabled LDOs consume power at all times.)
   
   Signed-off-by: Kalle Jokiniemi kalle.jokini...@digia.com
   Signed-off-by: David Brownell dbrown...@users.sourceforge.net
   ---
   Depends on the twl4030 regulator driver, so I'm suggesting this
   be merged (with that driver) through the regulator patch queue
   to simplify things.
   
drivers/usb/otg/twl4030-usb.c |   30 --
1 file changed, 24 insertions(+), 6 deletions(-)
  
  Applied.
 
 Better suggestion:  grab Kalle's updated patch from Greg's USB
 queue:
 
   
 http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-04-usb/
 
 patch name usb-twl-disable-vusb-regulators-when-cable-unplugged.patch


Yep, this previous one lacked some error checks and a build dependency
to TWL_REGULATOR. 

- Kalle


 
 - Dave
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html