[PATCH] usb/dwc3: comment update

2015-03-30 Thread Michael S. Tsirkin
The top of include/linux/pci_ids.h says:
Do not add new entries to this file unless the definitions
are shared between multiple drivers.
Drop comment in usb/dwc3 which conflicts with this.

Signed-off-by: Michael S. Tsirkin m...@redhat.com
---
 drivers/usb/dwc3/dwc3-pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 8d95056..759855b 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -24,7 +24,6 @@
 
 #include platform_data.h
 
-/* FIXME define these in linux/pci_ids.h */
 #define PCI_VENDOR_ID_SYNOPSYS 0x16c3
 #define PCI_DEVICE_ID_SYNOPSYS_HAPSUSB30xabcd
 #define PCI_DEVICE_ID_INTEL_BYT0x0f37
-- 
MST
--
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 3/3] mfd: menelaus: use macro for magic number

2015-03-30 Thread Lee Jones
On Sat, 28 Mar 2015, Aaro Koskinen wrote:

 Use macro to check a register bit.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  drivers/mfd/menelaus.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

 diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
 index 917fa86..c2ca665 100644
 --- a/drivers/mfd/menelaus.c
 +++ b/drivers/mfd/menelaus.c
 @@ -1216,7 +1216,7 @@ static int menelaus_probe(struct i2c_client *client,
   err = menelaus_read_reg(MENELAUS_VCORE_CTRL1);
   if (err  0)
   goto fail;
 - if (err  BIT(7))
 + if (err  VCORE_CTRL1_HW_NSW)
   menelaus-vcore_hw_mode = 1;
   else
   menelaus-vcore_hw_mode = 0;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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 86/86] usb/dwc3: move ids to pci_ids.h

2015-03-30 Thread Michael S. Tsirkin
On Mon, Mar 30, 2015 at 08:58:10AM +0200, Greg Kroah-Hartman wrote:
 On Mon, Mar 30, 2015 at 08:50:34AM +0200, Michael S. Tsirkin wrote:
  On Sun, Mar 29, 2015 at 10:42:00PM +0200, Greg Kroah-Hartman wrote:
   On Sun, Mar 29, 2015 at 03:43:40PM +0200, Michael S. Tsirkin wrote:
Comment says IDs should move to pci_ids.h, let's do it.
   
   No, please remove the comment, it's not needed in pci_ids.h at all.
  
  vendor ID does belong in pci_ids.h though, so says
  Documentation/PCI/pci.txt
 
 Read the top of pci_ids.h please.

Thanks for pointing this out, looks like Documentation/PCI/pci.txt
should be improved.
--
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/3] mfd: menelaus: drop support for SW controller VCORE

2015-03-30 Thread Lee Jones
On Sat, 28 Mar 2015, Aaro Koskinen wrote:

 Drop support for SW controlled VCORE, nobody uses it.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  drivers/mfd/menelaus.c   | 23 ---
  include/linux/mfd/menelaus.h |  1 -
  2 files changed, 24 deletions(-)

Applied, thanks.

 diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c
 index 9f01aef..917fa86 100644
 --- a/drivers/mfd/menelaus.c
 +++ b/drivers/mfd/menelaus.c
 @@ -532,29 +532,6 @@ static const struct menelaus_vtg_value vcore_values[] = {
   { 1450, 18 },
  };
  
 -int menelaus_set_vcore_sw(unsigned int mV)
 -{
 - int val, ret;
 - struct i2c_client *c = the_menelaus-client;
 -
 - val = menelaus_get_vtg_value(mV, vcore_values,
 -  ARRAY_SIZE(vcore_values));
 - if (val  0)
 - return -EINVAL;
 -
 - dev_dbg(c-dev, Setting VCORE to %d mV (val 0x%02x)\n, mV, val);
 -
 - /* Set SW mode and the voltage in one go. */
 - mutex_lock(the_menelaus-lock);
 - ret = menelaus_write_reg(MENELAUS_VCORE_CTRL1, val);
 - if (ret == 0)
 - the_menelaus-vcore_hw_mode = 0;
 - mutex_unlock(the_menelaus-lock);
 - msleep(1);
 -
 - return ret;
 -}
 -
  int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int floor_mV)
  {
   int fval, rval, val, ret;
 diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h
 index a1e12bf3..9e85ac0 100644
 --- a/include/linux/mfd/menelaus.h
 +++ b/include/linux/mfd/menelaus.h
 @@ -24,7 +24,6 @@ extern int menelaus_set_vaux(unsigned int mV);
  extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
  extern int menelaus_set_slot_sel(int enable);
  extern int menelaus_get_slot_pin_states(void);
 -extern int menelaus_set_vcore_sw(unsigned int mV);
  extern int menelaus_set_vcore_hw(unsigned int roof_mV, unsigned int 
 floor_mV);
  
  #define EN_VPLL_SLEEP(1  7)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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 86/86] usb/dwc3: move ids to pci_ids.h

2015-03-30 Thread Greg Kroah-Hartman
On Mon, Mar 30, 2015 at 08:50:34AM +0200, Michael S. Tsirkin wrote:
 On Sun, Mar 29, 2015 at 10:42:00PM +0200, Greg Kroah-Hartman wrote:
  On Sun, Mar 29, 2015 at 03:43:40PM +0200, Michael S. Tsirkin wrote:
   Comment says IDs should move to pci_ids.h, let's do it.
  
  No, please remove the comment, it's not needed in pci_ids.h at all.
 
 vendor ID does belong in pci_ids.h though, so says
 Documentation/PCI/pci.txt

Read the top of pci_ids.h please.
--
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 86/86] usb/dwc3: move ids to pci_ids.h

2015-03-30 Thread Michael S. Tsirkin
On Sun, Mar 29, 2015 at 10:42:00PM +0200, Greg Kroah-Hartman wrote:
 On Sun, Mar 29, 2015 at 03:43:40PM +0200, Michael S. Tsirkin wrote:
  Comment says IDs should move to pci_ids.h, let's do it.
 
 No, please remove the comment, it's not needed in pci_ids.h at all.

vendor ID does belong in pci_ids.h though, so says
Documentation/PCI/pci.txt

--
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] mfd: menelaus: delete omap_has_menelaus

2015-03-30 Thread Lee Jones
On Sat, 28 Mar 2015, Aaro Koskinen wrote:

 Delete unused macro.
 
 Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi
 ---
  include/linux/mfd/menelaus.h | 6 --
  1 file changed, 6 deletions(-)

Applied, thanks.

 diff --git a/include/linux/mfd/menelaus.h b/include/linux/mfd/menelaus.h
 index f097e89..a1e12bf3 100644
 --- a/include/linux/mfd/menelaus.h
 +++ b/include/linux/mfd/menelaus.h
 @@ -38,10 +38,4 @@ extern int menelaus_set_vcore_hw(unsigned int roof_mV, 
 unsigned int floor_mV);
  
  extern int menelaus_set_regulator_sleep(int enable, u32 val);
  
 -#if defined(CONFIG_ARCH_OMAP2)  defined(CONFIG_MENELAUS)
 -#define omap_has_menelaus()  1
 -#else
 -#define omap_has_menelaus()  0
 -#endif
 -
  #endif

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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 6/6] mmc: omap_hsmmc: use generic slot-gpio isr to manage card detect pin

2015-03-30 Thread Ulf Hansson
On 3 March 2015 at 13:28, Andreas Fenkart afenk...@gmail.com wrote:
 Signed-off-by: Andreas Fenkart afenk...@gmail.com

Thanks! Applied.

Kind regards
Uffe


 ---
  drivers/mmc/host/omap_hsmmc.c | 13 -
  1 file changed, 13 deletions(-)

 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
 index 4f6fbe5..0c3368e 100644
 --- a/drivers/mmc/host/omap_hsmmc.c
 +++ b/drivers/mmc/host/omap_hsmmc.c
 @@ -418,7 +418,6 @@ static inline int omap_hsmmc_have_reg(void)

  #endif

 -static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id);
  static irqreturn_t omap_hsmmc_cover_irq(int irq, void *dev_id);

  static int omap_hsmmc_gpio_init(struct mmc_host *mmc,
 @@ -440,7 +439,6 @@ static int omap_hsmmc_gpio_init(struct mmc_host *mmc,
 return ret;

 host-card_detect = omap_hsmmc_card_detect;
 -   mmc_gpio_set_cd_isr(mmc, omap_hsmmc_detect);
 }

 if (gpio_is_valid(pdata-gpio_wp)) {
 @@ -1247,17 +1245,6 @@ static irqreturn_t omap_hsmmc_cover_irq(int irq, void 
 *dev_id)
 return IRQ_HANDLED;
  }

 -/*
 - * irq handler to notify the core about card insertion/removal
 - */
 -static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
 -{
 -   struct omap_hsmmc_host *host = dev_id;
 -
 -   mmc_detect_change(host-mmc, (HZ * 200) / 1000);
 -   return IRQ_HANDLED;
 -}
 -
  static void omap_hsmmc_dma_callback(void *param)
  {
 struct omap_hsmmc_host *host = param;
 --
 2.1.4

--
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 5/6] mmc: omap_hsmmc: simplify card/cover detect isr

2015-03-30 Thread Ulf Hansson
On 3 March 2015 at 13:28, Andreas Fenkart afenk...@gmail.com wrote:
 strip the card dectet logic from cover detect isr and vice versa
 the generic mmc_gpio_cd_irqt isr, uses 200ms on removal/insertion,
 hence that should be fine here as well

 Signed-off-by: Andreas Fenkart afenk...@gmail.com

Thanks! Applied.

Kind regards
Uffe

 ---
  drivers/mmc/host/omap_hsmmc.c | 27 +++
  1 file changed, 3 insertions(+), 24 deletions(-)

 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
 index ed68e55..4f6fbe5 100644
 --- a/drivers/mmc/host/omap_hsmmc.c
 +++ b/drivers/mmc/host/omap_hsmmc.c
 @@ -1239,21 +1239,11 @@ static void omap_hsmmc_protect_card(struct 
 omap_hsmmc_host *host)
  static irqreturn_t omap_hsmmc_cover_irq(int irq, void *dev_id)
  {
 struct omap_hsmmc_host *host = dev_id;
 -   int carddetect;

 sysfs_notify(host-mmc-class_dev.kobj, NULL, cover_switch);

 -   if (host-card_detect) {
 -   carddetect = host-card_detect(host-dev);
 -   } else {
 -   omap_hsmmc_protect_card(host);
 -   carddetect = -ENOSYS;
 -   }
 -
 -   if (carddetect)
 -   mmc_detect_change(host-mmc, (HZ * 200) / 1000);
 -   else
 -   mmc_detect_change(host-mmc, (HZ * 50) / 1000);
 +   omap_hsmmc_protect_card(host);
 +   mmc_detect_change(host-mmc, (HZ * 200) / 1000);
 return IRQ_HANDLED;
  }

 @@ -1263,19 +1253,8 @@ static irqreturn_t omap_hsmmc_cover_irq(int irq, void 
 *dev_id)
  static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id)
  {
 struct omap_hsmmc_host *host = dev_id;
 -   int carddetect;
 -
 -   if (host-card_detect)
 -   carddetect = host-card_detect(host-dev);
 -   else {
 -   omap_hsmmc_protect_card(host);
 -   carddetect = -ENOSYS;
 -   }

 -   if (carddetect)
 -   mmc_detect_change(host-mmc, (HZ * 200) / 1000);
 -   else
 -   mmc_detect_change(host-mmc, (HZ * 50) / 1000);
 +   mmc_detect_change(host-mmc, (HZ * 200) / 1000);
 return IRQ_HANDLED;
  }

 --
 2.1.4

--
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] mfd: twl6040: Remove wrong and unneeded platform:twl6040 modalias

2015-03-30 Thread Lee Jones
On Mon, 30 Mar 2015, Axel Lin wrote:

 This is a I2C driver, so it's wrong to use platform prefix for the
 modalias. We have all needed i2c aliases coming form MODULE_DEVICE_TABLE,
 so let's remove the wrong and unneeded platform:twl6040 modalias.
 
 Signed-off-by: Axel Lin axel@ingics.com
 ---
  drivers/mfd/twl6040.c | 1 -
  1 file changed, 1 deletion(-)

Applied, thanks.

 diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
 index f71ee3d..c5265c1 100644
 --- a/drivers/mfd/twl6040.c
 +++ b/drivers/mfd/twl6040.c
 @@ -814,4 +814,3 @@ MODULE_DESCRIPTION(TWL6040 MFD);
  MODULE_AUTHOR(Misael Lopez Cruz misael.lo...@ti.com);
  MODULE_AUTHOR(Jorge Eduardo Candelaria jorge.candela...@ti.com);
  MODULE_LICENSE(GPL);
 -MODULE_ALIAS(platform:twl6040);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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 PULL] OMAP-GPMC driver updates for v4.1

2015-03-30 Thread Roger Quadros
Arnd, Olof,

On 23/03/15 12:32, Roger Quadros wrote:
 Hi Arnd, Hi Olof,
 
 Based on Tony's request I will be sending you pull requests for OMAP-GPMC 
 driver
 hence forth. I've sent this earlier on the 9th of March but had missed to 
 copy Olof.
 
 Please pull in these OMAP-GPMC driver fixes for v4.1.
 Patches have been tested for GPMC-NAND on dra7-evm and omap3-beagle.

Gentle reminder. Thanks.

cheers,
-roger

 
 The following changes since commit c517d838eb7d07bbe9507871fab3931deccff539:
 
   Linux 4.0-rc1 (2015-02-22 18:21:14 -0800)
 
 are available in the git repository at:
 
   g...@github.com:rogerq/linux.git tags/gpmc-omap-for-v4.1
 
 for you to fetch changes up to 4b613e9b4bbe94545a588a100e09006d827a7ebe:
 
   ARM OMAP2+ GPMC: fix programming/showing reserved timing parameters 
 (2015-03-06 12:55:32 +0200)
 
 
 OMAP-GPMC driver fixes for v4.1
 
 * Fixed WAITMONITORINGTIME programming to be based on
 GPMC_CLK instead of GPMC_FCLK. The GPMC clock divider
 programming is fixed for both synchronous and asynchronous
 modes.
 * Allow GPMC's children of default bus type to be populated in
 the device tree.
 * Improved DEBUG output data and format.
 * Prevent writing 1 into reserved bits of GPMC_CONFIG7.
 
 
 Robert ABEL (8):
   ARM OMAP2+ GPMC: don't undef DEBUG
   ARM OMAP2+ GPMC: add bus children
   ARM OMAP2+ GPMC: fix debug output alignment
   ARM OMAP2+ GPMC: change get_gpmc_timing_reg output for DTS
   ARM OMAP2+ GPMC: always program GPMCFCLKDIVIDER
   ARM OMAP2+ GPMC: calculate GPMCFCLKDIVIDER based on WAITMONITORINGTIME
   ARM OMAP2+ GPMC: fix WAITMONITORINGTIME divider bug
   ARM OMAP2+ GPMC: fix programming/showing reserved timing parameters
 
 Semen Protsenko (2):
   ARM: OMAP2+: gpmc: Fix writing in gpmc_cs_set_memconf
   ARM: OMAP2+: gpmc: make gpmc_cs_get_name() static
 
  arch/arm/mach-omap2/gpmc-nand.c|  18 +
  arch/arm/mach-omap2/gpmc-onenand.c |   4 +-
  arch/arm/mach-omap2/usb-tusb6010.c |   4 +-
  drivers/memory/omap-gpmc.c | 358 
 +++-
  include/linux/omap-gpmc.h  |   3 +-
  5 files changed, 305 insertions(+), 82 deletions(-)
 --
 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


[PATCH] mfd: twl6040: Remove wrong and unneeded platform:twl6040 modalias

2015-03-30 Thread Axel Lin
This is a I2C driver, so it's wrong to use platform prefix for the
modalias. We have all needed i2c aliases coming form MODULE_DEVICE_TABLE,
so let's remove the wrong and unneeded platform:twl6040 modalias.

Signed-off-by: Axel Lin axel@ingics.com
---
 drivers/mfd/twl6040.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/twl6040.c b/drivers/mfd/twl6040.c
index f71ee3d..c5265c1 100644
--- a/drivers/mfd/twl6040.c
+++ b/drivers/mfd/twl6040.c
@@ -814,4 +814,3 @@ MODULE_DESCRIPTION(TWL6040 MFD);
 MODULE_AUTHOR(Misael Lopez Cruz misael.lo...@ti.com);
 MODULE_AUTHOR(Jorge Eduardo Candelaria jorge.candela...@ti.com);
 MODULE_LICENSE(GPL);
-MODULE_ALIAS(platform:twl6040);
-- 
1.9.1



--
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] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Roger Quadros
Without this system suspend is broken on systems that have
drivers calling enable/disable_irq_wake() for interrupts based off
the dummy irq hook.
(e.g. drivers/gpio/gpio-pcf857x.c)

http://article.gmane.org/gmane.linux.kernel/1879035

Signed-off-by: Roger Quadros rog...@ti.com
---
 kernel/irq/dummychip.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
index 988dc58..2405d7a 100644
--- a/kernel/irq/dummychip.c
+++ b/kernel/irq/dummychip.c
@@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
return 0;
 }
 
+static int noop_int_ret(struct irq_data *data, unsigned int val)
+{
+   return 0;
+}
+
 /*
  * Generic no controller implementation
  */
@@ -57,5 +62,6 @@ struct irq_chip dummy_irq_chip = {
.irq_ack= noop,
.irq_mask   = noop,
.irq_unmask = noop,
+   .irq_set_wake   = noop_int_ret,
 };
 EXPORT_SYMBOL_GPL(dummy_irq_chip);
-- 
2.1.0

--
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] mfd: twl4030-power: Fix pmic for boards that need AC charger disabled

2015-03-30 Thread Tony Lindgren
I noticed the PMIC configuration on 37xx-evm won't actually shut down
the voltages during off-idle. Turns out 37xx-evm needs the AC charger
state transitions disabled like we are doing for SDP and LDP in the
legacy booting case.

Let's fix this for device tree based booting by setting up the quirk
flag based on the compatible flag. And let's also use the existing
define for STARTON_CHG.

Note that SDP and EVM do not have the PMIC clken wired to gate the
the oscillator while LDP has.

Signed-off-by: Tony Lindgren t...@atomide.com
---
 drivers/mfd/twl4030-power.c | 45 ++---
 include/linux/i2c/twl.h |  1 +
 2 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 3935092..c7929646 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -264,7 +264,9 @@ out:
return err;
 }
 
-static int twl4030_config_wakeup12_sequence(u8 address)
+static int
+twl4030_config_wakeup12_sequence(const struct twl4030_power_data *pdata,
+u8 address)
 {
int err = 0;
u8 data;
@@ -293,13 +295,14 @@ static int twl4030_config_wakeup12_sequence(u8 address)
if (err)
goto out;
 
-   if (machine_is_omap_3430sdp() || machine_is_omap_ldp()) {
+   if (pdata-ac_charger_quirk || machine_is_omap_3430sdp() ||
+   machine_is_omap_ldp()) {
/* Disabling AC charger effect on sleep-active transitions */
err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, data,
  R_CFG_P1_TRANSITION);
if (err)
goto out;
-   data = ~(11);
+   data = ~STARTON_CHG;
err = twl_i2c_write_u8(TWL_MODULE_PM_MASTER, data,
   R_CFG_P1_TRANSITION);
if (err)
@@ -459,8 +462,9 @@ static int twl4030_configure_resource(struct 
twl4030_resconfig *rconfig)
return 0;
 }
 
-static int load_twl4030_script(struct twl4030_script *tscript,
-  u8 address)
+static int load_twl4030_script(const struct twl4030_power_data *pdata,
+  struct twl4030_script *tscript,
+  u8 address)
 {
int err;
static int order;
@@ -487,7 +491,7 @@ static int load_twl4030_script(struct twl4030_script 
*tscript,
if (err)
goto out;
 
-   err = twl4030_config_wakeup12_sequence(address);
+   err = twl4030_config_wakeup12_sequence(pdata, address);
if (err)
goto out;
order = 1;
@@ -567,7 +571,7 @@ twl4030_power_configure_scripts(const struct 
twl4030_power_data *pdata)
u8 address = twl4030_start_script_address;
 
for (i = 0; i  pdata-num; i++) {
-   err = load_twl4030_script(pdata-scripts[i], address);
+   err = load_twl4030_script(pdata, pdata-scripts[i], address);
if (err)
return err;
address += pdata-scripts[i]-size;
@@ -829,6 +833,21 @@ static struct twl4030_power_data osc_off_idle = {
.board_config   = osc_off_rconfig,
 };
 
+static struct twl4030_power_data omap3_idle_ac_quirk = {
+   .scripts= omap3_idle_scripts,
+   .num= ARRAY_SIZE(omap3_idle_scripts),
+   .resource_config= omap3_idle_rconfig,
+   .ac_charger_quirk   = true,
+};
+
+static struct twl4030_power_data omap3_idle_ac_quirk_osc_off = {
+   .scripts= omap3_idle_scripts,
+   .num= ARRAY_SIZE(omap3_idle_scripts),
+   .resource_config= omap3_idle_rconfig,
+   .board_config   = osc_off_rconfig,
+   .ac_charger_quirk   = true,
+};
+
 static struct of_device_id twl4030_power_of_match[] = {
{
.compatible = ti,twl4030-power,
@@ -845,6 +864,18 @@ static struct of_device_id twl4030_power_of_match[] = {
.compatible = ti,twl4030-power-idle-osc-off,
.data = osc_off_idle,
},
+   {
+   .compatible = ti,twl4030-power-omap3-sdp,
+   .data = omap3_idle_ac_quirk,
+   },
+   {
+   .compatible = ti,twl4030-power-omap3-ldp,
+   .data = omap3_idle_ac_quirk_osc_off,
+   },
+   {
+   .compatible = ti,twl4030-power-omap3-evm,
+   .data = omap3_idle_ac_quirk,
+   },
{ },
 };
 MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 0bc03f1..9ad7828 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -675,6 +675,7 @@ struct twl4030_power_data {
struct twl4030_resconfig *board_config;
 #define TWL4030_RESCONFIG_UNDEF((u8)-1)
bool use_poweroff;  

Re: [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Jarkko Nikula
On 03/30/2015 07:42 PM, Tony Lindgren wrote:
 * Jarkko Nikula jarkko.nik...@bitmer.com [150330 09:31]:
 On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
 From: Pavel Machek pa...@ucw.cz

 N900 audio recording needs that codec provides bias voltage for integrated
 digital microphone and headset microphone depending which one is used.
 Digital microphone uses 2 V bias and it comes from the codec A part. Codec
 B part drives the headset microphone bias and that is set to 2.5 V.

 Signed-off-by: Pavel Machek pa...@ucw.cz
 [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
 e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
 Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
 ---
  arch/arm/boot/dts/omap3-n900.dts | 4 
  1 file changed, 4 insertions(+)

 Ping?
 
 Oops sorry I have missed this one. This looks like a regression fix
 for the v4.0-rc series? Should it be cc stable v3.16+ or something?
 
Well, there has been regression but finding exactly how far should the
fix go didn't look instantly straightforward due all DT, codec driver
mic bias etc changes and I ended up not cc'ing stable.

But well, I guess first kernel where this commit makes sense is 3.16+
due commit f7d0f2a08567 (ARM: dts: omap3-n900: Add sound support).
Although it applies on top of commit 14e3e295b2b9 (ARM: dts:
omap3-n900: Add TLV320AIC3X support) too (3.12+) but not before that.

-- 
Jarkko
--
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 RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Tony Lindgren
* Jarkko Nikula jarkko.nik...@bitmer.com [150330 10:46]:
 On 03/30/2015 07:42 PM, Tony Lindgren wrote:
  * Jarkko Nikula jarkko.nik...@bitmer.com [150330 09:31]:
  On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
  From: Pavel Machek pa...@ucw.cz
 
  N900 audio recording needs that codec provides bias voltage for integrated
  digital microphone and headset microphone depending which one is used.
  Digital microphone uses 2 V bias and it comes from the codec A part. Codec
  B part drives the headset microphone bias and that is set to 2.5 V.
 
  Signed-off-by: Pavel Machek pa...@ucw.cz
  [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
  e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
  Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
  ---
   arch/arm/boot/dts/omap3-n900.dts | 4 
   1 file changed, 4 insertions(+)
 
  Ping?
  
  Oops sorry I have missed this one. This looks like a regression fix
  for the v4.0-rc series? Should it be cc stable v3.16+ or something?
  
 Well, there has been regression but finding exactly how far should the
 fix go didn't look instantly straightforward due all DT, codec driver
 mic bias etc changes and I ended up not cc'ing stable.
 
 But well, I guess first kernel where this commit makes sense is 3.16+
 due commit f7d0f2a08567 (ARM: dts: omap3-n900: Add sound support).
 Although it applies on top of commit 14e3e295b2b9 (ARM: dts:
 omap3-n900: Add TLV320AIC3X support) too (3.12+) but not before that.

OK I think debian is using v3.16 kernel and that's pretty much the
first kernel that is usable with dts on many omap3 devices so might
make sense for that. I can add it if you think it makes sense.

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


Re: [PATCH] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Felipe Balbi
On Mon, Mar 30, 2015 at 04:15:45PM +0300, Roger Quadros wrote:
 Without this system suspend is broken on systems that have
 drivers calling enable/disable_irq_wake() for interrupts based off
 the dummy irq hook.
 (e.g. drivers/gpio/gpio-pcf857x.c)
 
 http://article.gmane.org/gmane.linux.kernel/1879035
 
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  kernel/irq/dummychip.c | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
 index 988dc58..2405d7a 100644
 --- a/kernel/irq/dummychip.c
 +++ b/kernel/irq/dummychip.c
 @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
   return 0;
  }
  
 +static int noop_int_ret(struct irq_data *data, unsigned int val)
 +{
 + return 0;
 +}
 +

isn't this the same as noop_ret ?

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v2 14/15] omap3isp: Add support for the Device Tree

2015-03-30 Thread Sebastian Reichel
Hi,

The code crashed for me on Nokia N900. I found the following
problem:

On Thu, Mar 26, 2015 at 12:57:38AM +0200, Sakari Ailus wrote:
 [...]
 +static int isp_of_parse_nodes(struct device *dev,
 +   struct v4l2_async_notifier *notifier)
 +{
 + struct device_node *node;

struct device_node *node = NULL;

to avoid feeding a random pointer into of_graph_get_next_endpoint():

 [...]
 + while (notifier-num_subdevs  ISP_MAX_SUBDEVS 
 +(node = of_graph_get_next_endpoint(dev-of_node, node))) {
 [...]

-- Sebastian


signature.asc
Description: Digital signature


Re: [PATCH 2/5] dmaengine: omap-dma: Fix memory leak when terminating running transfer

2015-03-30 Thread Vinod Koul
On Fri, Mar 27, 2015 at 01:35:52PM +0200, Peter Ujfalusi wrote:
 In omap_dma_start_desc the vdesc-node is removed from the virt-dma
 framework managed lists (to be precise from the desc_issued list).
 If a terminate_all comes before the transfer finishes the omap_desc will
 not be freed up because it is not in any of the lists and we stopped the
 DMA channel so the transfer will not going to complete.
 There is no special sequence for leaking memory when using cyclic (audio)
 transfer: with every start and stop of a cyclic transfer the driver leaks
 struct omap_desc worth of memory.
 
 Free up the allocated memory directly in omap_dma_terminate_all() since the
 framework will not going to do that for us.
 
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 CC: sta...@vger.kernel.org
 CC: linux-omap@vger.kernel.org
Applied, thanks

-- 
~Vinod

 ---
  drivers/dma/omap-dma.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
 index 1e646d6c8230..6a4c378ee432 100644
 --- a/drivers/dma/omap-dma.c
 +++ b/drivers/dma/omap-dma.c
 @@ -1002,6 +1002,7 @@ static int omap_dma_terminate_all(struct dma_chan *chan)
* c-desc is NULL and exit.)
*/
   if (c-desc) {
 + omap_dma_desc_free(c-desc-vd);
   c-desc = NULL;
   /* Avoid stopping the dma twice */
   if (!c-paused)
 -- 
 2.3.3
 

-- 
--
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/5] dmaengine: edma: fix memory leak when terminating running transfers

2015-03-30 Thread Vinod Koul
On Fri, Mar 27, 2015 at 01:35:51PM +0200, Peter Ujfalusi wrote:
 From: Petr Kulhavy p...@barix.com
 
 If edma_terminate_all() was called while a transfer was running (i.e. after
 edma_execute() but before edma_callback()) the echan-edesc was not freed.
 
 This was due to the fact that a running transfer is on none of the
 vchan lists: desc_submitted, desc_issued, desc_completed (edma_execute()
 removes it from the desc_issued list), so the vchan_dma_desc_free_list()
 called at the end of edma_terminate_all() didn't find it and didn't free it.
 
 This bug was found on an AM1808 based hardware (very similar to da850evm,
 however using the second MMC/SD controller), where intense operations on the 
 SD
 card wasted the device 128MB RAM within a couple of days.
 
 Peter Ujfalusi:
 The issue is even more severe since it affects cyclic (audio) transfers as
 well. In this case starting/stopping audio will results memory leak.
 
 Signed-off-by: Petr Kulhavy p...@barix.com
 Signed-off-by: Peter Ujfalusi peter.ujfal...@ti.com
 CC: sta...@vger.kernel.org
 CC: linux-omap@vger.kernel.org
Applied, thanks

-- 
~Vinod

 ---
  drivers/dma/edma.c | 7 +++
  1 file changed, 7 insertions(+)
 
 diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
 index 741baa68365c..984c2b12dae3 100644
 --- a/drivers/dma/edma.c
 +++ b/drivers/dma/edma.c
 @@ -268,6 +268,13 @@ static int edma_terminate_all(struct dma_chan *chan)
*/
   if (echan-edesc) {
   int cyclic = echan-edesc-cyclic;
 +
 + /*
 +  * free the running request descriptor
 +  * since it is not in any of the vdesc lists
 +  */
 + edma_desc_free(echan-edesc-vdesc);
 +
   echan-edesc = NULL;
   edma_stop(echan-ch_num);
   /* Move the cyclic channel back to default queue */
 -- 
 2.3.3
 

-- 
--
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 RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Tony Lindgren
* Jarkko Nikula jarkko.nik...@bitmer.com [150330 09:31]:
 On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
  From: Pavel Machek pa...@ucw.cz
  
  N900 audio recording needs that codec provides bias voltage for integrated
  digital microphone and headset microphone depending which one is used.
  Digital microphone uses 2 V bias and it comes from the codec A part. Codec
  B part drives the headset microphone bias and that is set to 2.5 V.
  
  Signed-off-by: Pavel Machek pa...@ucw.cz
  [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
  e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
  Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
  ---
   arch/arm/boot/dts/omap3-n900.dts | 4 
   1 file changed, 4 insertions(+)
  
 Ping?

Oops sorry I have missed this one. This looks like a regression fix
for the v4.0-rc series? Should it be cc stable v3.16+ or something?

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


Re: [PATCH v2 1/7] dmaengine: of_dma: Support for DMA routers

2015-03-30 Thread Vinod Koul
On Fri, Mar 27, 2015 at 02:25:29PM +0200, Peter Ujfalusi wrote:
 On 03/26/2015 05:32 PM, Vinod Koul wrote:
  I have added the DT binding document since this series adds support for
  routers for platforms booting with DT:
 
  Documentation/devicetree/bindings/dma/dma.txt | 28 
  I meant the update to Documnetation/dmanegine/ for routers :)
 
 I see. In what form you think we should have the documentation? Is it adequate
 to lift and adjust the text from the DT binding document here? Should we have
 a separate file for the router description?
 My concern was and this is why I did not wrote anything under here is that the
 code I add is only covers the DT boot case and I'm not planning to add legacy
 support. The ACPI binding can be done in a similar fashion as the DT so you
 would have a translator driver with ACPI API.
Not the binding part but more of a guideline on how to go about solving the
DMA router design for drivers

-- 
~Vinod

--
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] genirq: provide dummy set_irq_wake()

2015-03-30 Thread Felipe Balbi
On Mon, Mar 30, 2015 at 01:06:24PM -0500, Felipe Balbi wrote:
 On Mon, Mar 30, 2015 at 04:15:45PM +0300, Roger Quadros wrote:
  Without this system suspend is broken on systems that have
  drivers calling enable/disable_irq_wake() for interrupts based off
  the dummy irq hook.
  (e.g. drivers/gpio/gpio-pcf857x.c)
  
  http://article.gmane.org/gmane.linux.kernel/1879035
  
  Signed-off-by: Roger Quadros rog...@ti.com
  ---
   kernel/irq/dummychip.c | 6 ++
   1 file changed, 6 insertions(+)
  
  diff --git a/kernel/irq/dummychip.c b/kernel/irq/dummychip.c
  index 988dc58..2405d7a 100644
  --- a/kernel/irq/dummychip.c
  +++ b/kernel/irq/dummychip.c
  @@ -32,6 +32,11 @@ static unsigned int noop_ret(struct irq_data *data)
  return 0;
   }
   
  +static int noop_int_ret(struct irq_data *data, unsigned int val)
  +{
  +   return 0;
  +}
  +
 
 isn't this the same as noop_ret ?

oh no, unsigned versus signed.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages

2015-03-30 Thread Jarkko Nikula
On 03/01/2015 09:07 PM, Jarkko Nikula wrote:
 From: Pavel Machek pa...@ucw.cz
 
 N900 audio recording needs that codec provides bias voltage for integrated
 digital microphone and headset microphone depending which one is used.
 Digital microphone uses 2 V bias and it comes from the codec A part. Codec
 B part drives the headset microphone bias and that is set to 2.5 V.
 
 Signed-off-by: Pavel Machek pa...@ucw.cz
 [Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
 e2e8bfdf6157 (ASoC: tlv320aic3x: Convert mic bias to a supply widget)]
 Signed-off-by: Jarkko Nikula jarkko.nik...@bitmer.com
 ---
  arch/arm/boot/dts/omap3-n900.dts | 4 
  1 file changed, 4 insertions(+)
 
Ping?

-- 
Jarkko

--
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] arm: dts: omap3: Add #iommu-cells to isp iommu

2015-03-30 Thread Sakari Ailus
Hi Sebastian,

On Tue, Mar 31, 2015 at 01:13:23AM +0200, Sebastian Reichel wrote:
 Add missing #iommu-cells property to the image signal processor's iommu
 node. This fixes the binding (property is required according to the
 generic iommu binding) and removes the following kernel warning
 triggered once the iommu node is referenced:
 
 [0.647521] /ocp/isp@480bc000: could not get #iommu-cells for 
 /ocp/mmu@480bd400
 
 Signed-off-by: Sebastian Reichel s...@kernel.org
 Cc: Sakari Ailus sakari.ai...@iki.fi
 Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
 ---
  arch/arm/boot/dts/omap3.dtsi | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
 index fe0b293..77751ef 100644
 --- a/arch/arm/boot/dts/omap3.dtsi
 +++ b/arch/arm/boot/dts/omap3.dtsi
 @@ -440,6 +440,7 @@
   };
  
   mmu_isp: mmu@480bd400 {
 + #iommu-cells = 0;

Could you add one for mmu_iva below, too, please?

   compatible = ti,omap2-iommu;
   reg = 0x480bd400 0x80;
   interrupts = 24;

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
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: [PATCHv5 30/35] ARM: dts: omap4: add minimal l4 bus layout with control module support

2015-03-30 Thread Tony Lindgren
Hi,

* Tero Kristo t-kri...@ti.com [150320 11:46]:
 This patch creates the l4_cfg and l4_wkup interconnects for OMAP4, and
 moves some of the generic peripherals under it. System control module
 support is added to the device tree also, and the existing SCM related
 functionality is moved under it.

Doing a diff on the dmesg output before and after this series now
produces this extra warning on omap4:

+ti_dt_clk_init_provider: scm_conf missing 'clocks' child node

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


Re: [PATCH v2 14/15] omap3isp: Add support for the Device Tree

2015-03-30 Thread Sakari Ailus
Hi Sebastian,

On Mon, Mar 30, 2015 at 07:41:23PM +0200, Sebastian Reichel wrote:
 Hi,
 
 The code crashed for me on Nokia N900. I found the following
 problem:
 
 On Thu, Mar 26, 2015 at 12:57:38AM +0200, Sakari Ailus wrote:
  [...]
  +static int isp_of_parse_nodes(struct device *dev,
  + struct v4l2_async_notifier *notifier)
  +{
  +   struct device_node *node;
 
 struct device_node *node = NULL;
 
 to avoid feeding a random pointer into of_graph_get_next_endpoint():

Good catch!

Laurent, could you use a new version of this patch, and send a new pull
request, or would you prefer an additional patch to fix this?

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
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] arm: dts: omap3: Add #iommu-cells to isp iommu

2015-03-30 Thread Sebastian Reichel
Add missing #iommu-cells property to the image signal processor's iommu
node. This fixes the binding (property is required according to the
generic iommu binding) and removes the following kernel warning
triggered once the iommu node is referenced:

[0.647521] /ocp/isp@480bc000: could not get #iommu-cells for 
/ocp/mmu@480bd400

Signed-off-by: Sebastian Reichel s...@kernel.org
Cc: Sakari Ailus sakari.ai...@iki.fi
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 arch/arm/boot/dts/omap3.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index fe0b293..77751ef 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -440,6 +440,7 @@
};
 
mmu_isp: mmu@480bd400 {
+   #iommu-cells = 0;
compatible = ti,omap2-iommu;
reg = 0x480bd400 0x80;
interrupts = 24;
-- 
2.1.4

--
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 1/1] omap3isp: Don't pass uninitialised arguments to of_graph_get_next_endpoint()

2015-03-30 Thread Sakari Ailus
isp_of_parse_nodes() passed an uninitialised prev argument to
of_graph_get_next_endpoint(). This is bad, fix it by assigning NULL to it in
the initialisation.

Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
Reported-by: Sebastian Reichel s...@kernel.org
---
 drivers/media/platform/omap3isp/isp.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index ff8f633..ff51c4f 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2338,7 +2338,7 @@ static int isp_of_parse_node(struct device *dev, struct 
device_node *node,
 static int isp_of_parse_nodes(struct device *dev,
  struct v4l2_async_notifier *notifier)
 {
-   struct device_node *node;
+   struct device_node *node = NULL;
 
notifier-subdevs = devm_kcalloc(
dev, ISP_MAX_SUBDEVS, sizeof(*notifier-subdevs), GFP_KERNEL);
-- 
1.7.10.4

--
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: [PATCHv5 26/35] ARM: dts: omap3: add minimal l4 bus layout with control module support

2015-03-30 Thread Tony Lindgren
Hi,

* Tero Kristo t-kri...@ti.com [150320 11:46]:
 --- a/arch/arm/boot/dts/omap3.dtsi
 +++ b/arch/arm/boot/dts/omap3.dtsi
 @@ -87,6 +87,60 @@
   ranges;
   ti,hwmods = l3_main;
  
 + l4_core: l4@4800 {
 + compatible = ti,omap3-l4-core, simple-bus;
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges = 0 0x4800 0x100;
 +
 + scm: scm@2000 {
 + compatible = ti,omap3-scm, simple-bus;
 + reg = 0x2000 0x2000;
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges = 0 0x2000 0x2000;
 +
 + omap3_pmx_core: pinmux@30 {
 + compatible = ti,omap3-padconf,
 +  pinctrl-single;
 + reg = 0x30 0x230;
 + #address-cells = 1;
 + #size-cells = 0;
 + #interrupt-cells = 1;
 + interrupt-controller;
 + pinctrl-single,register-width = 16;
 + pinctrl-single,function-mask = 0xff1f;
 + };

Just noticed we may be now missing few pins as diffing the dmesg before
and after this series produces this on omap3:

-pinctrl-single 48002030.pinmux: 284 pins at pa fa002030 size 568
+pinctrl-single 48002030.pinmux: 280 pins at pa fa002030 size 560

Care to check that?

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


Re: [PATCH 1/1] omap3isp: Don't pass uninitialised arguments to of_graph_get_next_endpoint()

2015-03-30 Thread Sebastian Reichel
Hi,

On Tue, Mar 31, 2015 at 02:13:28AM +0300, Sakari Ailus wrote:
 isp_of_parse_nodes() passed an uninitialised prev argument to
 of_graph_get_next_endpoint(). This is bad, fix it by assigning NULL to it in
 the initialisation.
 
 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 Reported-by: Sebastian Reichel s...@kernel.org
 ---
  drivers/media/platform/omap3isp/isp.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/media/platform/omap3isp/isp.c 
 b/drivers/media/platform/omap3isp/isp.c
 index ff8f633..ff51c4f 100644
 --- a/drivers/media/platform/omap3isp/isp.c
 +++ b/drivers/media/platform/omap3isp/isp.c
 @@ -2338,7 +2338,7 @@ static int isp_of_parse_node(struct device *dev, struct 
 device_node *node,
  static int isp_of_parse_nodes(struct device *dev,
 struct v4l2_async_notifier *notifier)
  {
 - struct device_node *node;
 + struct device_node *node = NULL;
  
   notifier-subdevs = devm_kcalloc(
   dev, ISP_MAX_SUBDEVS, sizeof(*notifier-subdevs), GFP_KERNEL);

Acked-By: Sebastian Reichel s...@kernel.org

Note, that this actually triggered the following stacktrace for me,
so you may want to add a Fixes: commitid and the stacktrace to the
commit message if its not merged with the original commit (relevant
for people doing git bisect).

[1.587951] pgd = c0004000
[1.590820] [fe17] *pgd=8fef6821, *pte=, *ppte=
[1.597503] Internal error: Oops: 17 [#1] SMP ARM
[1.602478] Modules linked in:
[1.605743] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 
4.0.0-rc1-00019-g258ac6a-dirty #293
[1.614379] Hardware name: Nokia RX-51 board
[1.618896] task: ce0aab80 ti: ce0ac000 task.ti: ce0ac000
[1.624603] PC is at of_get_parent+0x18/0x34
[1.629150] LR is at _raw_spin_lock_irqsave+0x48/0x54
[1.634490] pc : [c05c6034]lr : [c07d5e20]psr: 6193
[1.634490] sp : ce0addc8  ip : c0c0b5a0  fp : c0b91b90
[1.646636] r10: c0b2e598  r9 : ce3804d0  r8 : 
[1.652160] r7 : fdfb  r6 : cfc84c44  r5 : fdfb  r4 : fdfb
[1.659057] r3 : 6193  r2 :   r1 : 95d695d5  r0 : a113
[1.665954] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
kernel
[1.673767] Control: 10c5387d  Table: 80004019  DAC: 0015
[1.679870] Process swapper/0 (pid: 1, stack limit = 0xce0ac218)
[1.686218] Stack: (0xce0addc8 to 0xce0ae000)
[1.690826] ddc0:   ce380010 c05c662c ce545810 c041d9e0 
ce380010 ce1f4010
[1.699462] dde0: ce1f4000 c056b024 c07d4254 ce0aab80 0001 c142199c 
c0a547f0 c0085dcc
[1.708129] de00: c0bfeee8 6113 c0bfef0c c07d4254 0002  
ce546c90 ce1f6270
[1.716766] de20: ce1f6270 c01bced0 ce1f6270 c0a547f0 ce1f6270 ce546d50 
 0001
[1.725433] de40: ce1f6270 c0a547f0 ce546c90 c1457f98 ce1f4010 c0c304d4 
fdfb 
[1.734069] de60:  c0b2e598 c0b91b90 c041c6c8 c041c684 c1457f98 
ce1f4010 
[1.742736] de80: c0c304d4 c041ade4  ce1f4010 c0c304d4 ce1f4044 
c0c18730 
[1.751373] dea0: c0b91b98 c041aff4  c0c304d4 c041af60 c041936c 
ce0d7ca4 ce1f7e90
[1.760040] dec0: c0c304d4 ce526740  c041a608 c09f8b88 c0c304d4 
c0bb3eb0 c0c304d4
[1.768676] dee0: c0bb3eb0 ce5458c0 c0b71550 c041b74c  c0bb3eb0 
c0bb3eb0 c0008b64
[1.777343] df00: cfeff246 cfeff241 c082416c c0aed820 0100 c0aede00 
 005e
[1.785980] df20: cfeff241 ce0adf38 0072  cfeff292 c005b040 
c0a6bfb8 cfeff294
[1.794647] df40: 0006 0006  c0ba7c74 c0ba7fa8 0006 
c0c61700 0114
[1.803283] df60: c0c61700 c0b2e598 c0b91b90 c0b2eea0 0006 0006 
c0b2e598 
[1.811920] df80: fffbfdff  c07ca054    
 
[1.820587] dfa0:  c07ca05c  c000e8f0   
 
[1.829223] dfc0:       
 
[1.837890] dfe0:     0013  
 
[1.846557] [c05c6034] (of_get_parent) from [c05c662c] 
(of_graph_get_next_endpoint+0x24/0x118)
[1.856018] [c05c662c] (of_graph_get_next_endpoint) from [c056b024] 
(isp_probe+0x118/0xf58)
[1.865234] [c056b024] (isp_probe) from [c041c6c8] 
(platform_drv_probe+0x44/0xa4)
[1.873535] [c041c6c8] (platform_drv_probe) from [c041ade4] 
(driver_probe_device+0x104/0x23c)
[1.882934] [c041ade4] (driver_probe_device) from [c041aff4] 
(__driver_attach+0x94/0x98)
[1.891876] [c041aff4] (__driver_attach) from [c041936c] 
(bus_for_each_dev+0x6c/0xa0)
[1.900512] [c041936c] (bus_for_each_dev) from [c041a608] 
(bus_add_driver+0x144/0x1f0)
[1.909271] [c041a608] (bus_add_driver) from [c041b74c] 
(driver_register+0x78/0xf8)
[1.917755] [c041b74c] (driver_register) from [c0008b64] 
(do_one_initcall+0x80/0x1dc)
[1.926391] [c0008b64] 

[PATCH 01/25] arm: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
Use the normal return values for bool functions

Signed-off-by: Joe Perches j...@perches.com
---
 arch/arm/include/asm/dma-mapping.h |  8 
 arch/arm/include/asm/kvm_emulate.h |  2 +-
 arch/arm/mach-omap2/powerdomain.c  | 14 +++---
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index b52101d..166e1e1 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -151,18 +151,18 @@ static inline bool dma_capable(struct device *dev, 
dma_addr_t addr, size_t size)
u64 limit, mask;
 
if (!dev-dma_mask)
-   return 0;
+   return false;
 
mask = *dev-dma_mask;
 
limit = (mask + 1)  ~mask;
if (limit  size  limit)
-   return 0;
+   return false;
 
if ((addr | (addr + size - 1))  ~mask)
-   return 0;
+   return false;
 
-   return 1;
+   return true;
 }
 
 static inline void dma_mark_clean(void *addr, size_t size) { }
diff --git a/arch/arm/include/asm/kvm_emulate.h 
b/arch/arm/include/asm/kvm_emulate.h
index a9c80a2..ad200a0 100644
--- a/arch/arm/include/asm/kvm_emulate.h
+++ b/arch/arm/include/asm/kvm_emulate.h
@@ -51,7 +51,7 @@ static inline void vcpu_set_hcr(struct kvm_vcpu *vcpu, 
unsigned long hcr)
 
 static inline bool vcpu_mode_is_32bit(struct kvm_vcpu *vcpu)
 {
-   return 1;
+   return true;
 }
 
 static inline unsigned long *vcpu_pc(struct kvm_vcpu *vcpu)
diff --git a/arch/arm/mach-omap2/powerdomain.c 
b/arch/arm/mach-omap2/powerdomain.c
index 78af6d8..897f9fb 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -950,7 +950,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
  */
 bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
 {
-   return (pwrdm  pwrdm-flags  PWRDM_HAS_HDWR_SAR) ? 1 : 0;
+   return pwrdm  (pwrdm-flags  PWRDM_HAS_HDWR_SAR);
 }
 
 int pwrdm_state_switch_nolock(struct powerdomain *pwrdm)
@@ -1185,24 +1185,24 @@ bool pwrdm_can_ever_lose_context(struct powerdomain 
*pwrdm)
if (!pwrdm) {
pr_debug(powerdomain: %s: invalid powerdomain pointer\n,
 __func__);
-   return 1;
+   return true;
}
 
if (pwrdm-pwrsts  PWRSTS_OFF)
-   return 1;
+   return true;
 
if (pwrdm-pwrsts  PWRSTS_RET) {
if (pwrdm-pwrsts_logic_ret  PWRSTS_OFF)
-   return 1;
+   return true;
 
for (i = 0; i  pwrdm-banks; i++)
if (pwrdm-pwrsts_mem_ret[i]  PWRSTS_OFF)
-   return 1;
+   return true;
}
 
for (i = 0; i  pwrdm-banks; i++)
if (pwrdm-pwrsts_mem_on[i]  PWRSTS_OFF)
-   return 1;
+   return true;
 
-   return 0;
+   return false;
 }
-- 
2.1.2

--
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/25] treewide: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
Joe Perches (25):
  arm: Use bool function return values of true/false not 1/0
  arm64: Use bool function return values of true/false not 1/0
  hexagon: Use bool function return values of true/false not 1/0
  ia64: Use bool function return values of true/false not 1/0
  mips: Use bool function return values of true/false not 1/0
  powerpc: Use bool function return values of true/false not 1/0
  s390: Use bool function return values of true/false not 1/0
  sparc: Use bool function return values of true/false not 1/0
  tile: Use bool function return values of true/false not 1/0
  unicore32: Use bool function return values of true/false not 1/0
  x86: Use bool function return values of true/false not 1/0
  virtio_console: Use bool function return values of true/false not 1/0
  csiostor: Use bool function return values of true/false not 1/0
  dcache: Use bool function return values of true/false not 1/0
  nfsd: nfs4state: Use bool function return values of true/false not 1/0
  include/linux: Use bool function return values of true/false not 1/0
  sound: Use bool function return values of true/false not 1/0
  rcu: tree_plugin: Use bool function return values of true/false not 1/0
  sched: Use bool function return values of true/false not 1/0
  ftrace: Use bool function return values of true/false not 1/0
  slub: Use bool function return values of true/false not 1/0
  bridge: Use bool function return values of true/false not 1/0
  netfilter: Use bool function return values of true/false not 1/0
  security: Use bool function return values of true/false not 1/0
  sound: wm5100-tables: Use bool function return values of true/false not 1/0

 arch/arm/include/asm/dma-mapping.h   |  8 ++--
 arch/arm/include/asm/kvm_emulate.h   |  2 +-
 arch/arm/mach-omap2/powerdomain.c| 14 +++---
 arch/arm64/include/asm/dma-mapping.h |  2 +-
 arch/hexagon/include/asm/dma-mapping.h   |  2 +-
 arch/ia64/include/asm/dma-mapping.h  |  2 +-
 arch/mips/include/asm/dma-mapping.h  |  2 +-
 arch/powerpc/include/asm/dcr-native.h|  2 +-
 arch/powerpc/include/asm/dma-mapping.h   |  4 +-
 arch/powerpc/include/asm/kvm_book3s_64.h |  4 +-
 arch/powerpc/sysdev/dcr.c|  2 +-
 arch/s390/include/asm/dma-mapping.h  |  2 +-
 arch/sparc/mm/init_64.c  |  8 ++--
 arch/tile/include/asm/dma-mapping.h  |  2 +-
 arch/unicore32/include/asm/dma-mapping.h |  2 +-
 arch/x86/include/asm/archrandom.h|  2 +-
 arch/x86/include/asm/dma-mapping.h   |  2 +-
 arch/x86/include/asm/kvm_para.h  |  2 +-
 arch/x86/kvm/cpuid.h |  2 +-
 arch/x86/kvm/vmx.c   | 72 ++--
 drivers/char/virtio_console.c|  2 +-
 drivers/scsi/csiostor/csio_scsi.c|  4 +-
 fs/dcache.c  | 12 ++---
 fs/nfsd/nfs4state.c  |  2 +-
 include/linux/blkdev.h   |  2 +-
 include/linux/ide.h  |  2 +-
 include/linux/kgdb.h |  2 +-
 include/linux/mfd/db8500-prcmu.h |  2 +-
 include/linux/mm.h   |  2 +-
 include/linux/power_supply.h |  8 ++--
 include/linux/ssb/ssb_driver_extif.h |  2 +-
 include/linux/ssb/ssb_driver_gige.h  | 16 +++
 include/sound/soc.h  |  4 +-
 kernel/rcu/tree_plugin.h |  4 +-
 kernel/sched/auto_group.h|  2 +-
 kernel/sched/completion.c| 16 ---
 kernel/trace/ftrace.c| 10 ++--
 mm/slub.c| 12 ++---
 net/bridge/br_private.h  |  2 +-
 net/ipv4/netfilter/ipt_ah.c  |  2 +-
 net/netfilter/ipset/ip_set_hash_ip.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipmark.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipport.c |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportip.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_ipportnet.c  |  8 ++--
 net/netfilter/ipset/ip_set_hash_net.c|  8 ++--
 net/netfilter/ipset/ip_set_hash_netiface.c   |  8 ++--
 net/netfilter/ipset/ip_set_hash_netport.c|  8 ++--
 net/netfilter/ipset/ip_set_hash_netportnet.c |  8 ++--
 net/netfilter/xt_connlimit.c |  2 +-
 net/netfilter/xt_hashlimit.c |  2 +-
 net/netfilter/xt_ipcomp.c|  2 +-
 security/apparmor/file.c |  8 ++--
 security/apparmor/policy.c   | 10 ++--
 sound/soc/codecs/wm5100-tables.c | 12 ++---
 55 files changed, 178 insertions(+), 176 deletions(-)

-- 
2.1.2

--
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 00/25] treewide: Use bool function return values of true/false not 1/0

2015-03-30 Thread Casey Schaufler
On 3/30/2015 4:45 PM, Joe Perches wrote:
 Joe Perches (25):
   arm: Use bool function return values of true/false not 1/0
   arm64: Use bool function return values of true/false not 1/0
   hexagon: Use bool function return values of true/false not 1/0
   ia64: Use bool function return values of true/false not 1/0
   mips: Use bool function return values of true/false not 1/0
   powerpc: Use bool function return values of true/false not 1/0
   s390: Use bool function return values of true/false not 1/0
   sparc: Use bool function return values of true/false not 1/0
   tile: Use bool function return values of true/false not 1/0
   unicore32: Use bool function return values of true/false not 1/0
   x86: Use bool function return values of true/false not 1/0
   virtio_console: Use bool function return values of true/false not 1/0
   csiostor: Use bool function return values of true/false not 1/0
   dcache: Use bool function return values of true/false not 1/0
   nfsd: nfs4state: Use bool function return values of true/false not 1/0
   include/linux: Use bool function return values of true/false not 1/0
   sound: Use bool function return values of true/false not 1/0
   rcu: tree_plugin: Use bool function return values of true/false not 1/0
   sched: Use bool function return values of true/false not 1/0
   ftrace: Use bool function return values of true/false not 1/0
   slub: Use bool function return values of true/false not 1/0
   bridge: Use bool function return values of true/false not 1/0
   netfilter: Use bool function return values of true/false not 1/0
   security: Use bool function return values of true/false not 1/0
   sound: wm5100-tables: Use bool function return values of true/false not 1/0

  arch/arm/include/asm/dma-mapping.h   |  8 ++--
  arch/arm/include/asm/kvm_emulate.h   |  2 +-
  arch/arm/mach-omap2/powerdomain.c| 14 +++---
  arch/arm64/include/asm/dma-mapping.h |  2 +-
  arch/hexagon/include/asm/dma-mapping.h   |  2 +-
  arch/ia64/include/asm/dma-mapping.h  |  2 +-
  arch/mips/include/asm/dma-mapping.h  |  2 +-
  arch/powerpc/include/asm/dcr-native.h|  2 +-
  arch/powerpc/include/asm/dma-mapping.h   |  4 +-
  arch/powerpc/include/asm/kvm_book3s_64.h |  4 +-
  arch/powerpc/sysdev/dcr.c|  2 +-
  arch/s390/include/asm/dma-mapping.h  |  2 +-
  arch/sparc/mm/init_64.c  |  8 ++--
  arch/tile/include/asm/dma-mapping.h  |  2 +-
  arch/unicore32/include/asm/dma-mapping.h |  2 +-
  arch/x86/include/asm/archrandom.h|  2 +-
  arch/x86/include/asm/dma-mapping.h   |  2 +-
  arch/x86/include/asm/kvm_para.h  |  2 +-
  arch/x86/kvm/cpuid.h |  2 +-
  arch/x86/kvm/vmx.c   | 72 
 ++--
  drivers/char/virtio_console.c|  2 +-
  drivers/scsi/csiostor/csio_scsi.c|  4 +-
  fs/dcache.c  | 12 ++---
  fs/nfsd/nfs4state.c  |  2 +-
  include/linux/blkdev.h   |  2 +-
  include/linux/ide.h  |  2 +-
  include/linux/kgdb.h |  2 +-
  include/linux/mfd/db8500-prcmu.h |  2 +-
  include/linux/mm.h   |  2 +-
  include/linux/power_supply.h |  8 ++--
  include/linux/ssb/ssb_driver_extif.h |  2 +-
  include/linux/ssb/ssb_driver_gige.h  | 16 +++
  include/sound/soc.h  |  4 +-
  kernel/rcu/tree_plugin.h |  4 +-
  kernel/sched/auto_group.h|  2 +-
  kernel/sched/completion.c| 16 ---
  kernel/trace/ftrace.c| 10 ++--
  mm/slub.c| 12 ++---
  net/bridge/br_private.h  |  2 +-
  net/ipv4/netfilter/ipt_ah.c  |  2 +-
  net/netfilter/ipset/ip_set_hash_ip.c |  8 ++--
  net/netfilter/ipset/ip_set_hash_ipmark.c |  8 ++--
  net/netfilter/ipset/ip_set_hash_ipport.c |  8 ++--
  net/netfilter/ipset/ip_set_hash_ipportip.c   |  8 ++--
  net/netfilter/ipset/ip_set_hash_ipportnet.c  |  8 ++--
  net/netfilter/ipset/ip_set_hash_net.c|  8 ++--
  net/netfilter/ipset/ip_set_hash_netiface.c   |  8 ++--
  net/netfilter/ipset/ip_set_hash_netport.c|  8 ++--
  net/netfilter/ipset/ip_set_hash_netportnet.c |  8 ++--
  net/netfilter/xt_connlimit.c |  2 +-
  net/netfilter/xt_hashlimit.c |  2 +-
  net/netfilter/xt_ipcomp.c|  2 +-
  security/apparmor/file.c |  8 ++--
  security/apparmor/policy.c   | 10 ++--
  sound/soc/codecs/wm5100-tables.c | 12 ++---

Why, and why these in particular?

  55 files changed, 178 insertions(+), 176 deletions(-)


--
To unsubscribe from this list: send the line unsubscribe linux-omap 

Re: [PATCHv5 00/35] ARM: OMAP2+: PRCM/SCM cleanups against 4.0-rc

2015-03-30 Thread Tony Lindgren
Hi Tero,

* Tero Kristo t-kri...@ti.com [150320 11:45]:
 Hi,
 
 v5 contains the following changes still:
 
 - re-ordered patches a bit, the single clock driver fix moved to beginning
   of the set, waiting for a separate merge from Mike
 - Changed patch #23 to fix the slightly misleading logic (removed the extra 
 +1)
 - Changed patches #16 and #18 to fix OMAP2/3/4 etc. only builds
 - Fixed ti81xx boot issues (hopefully, I don't have access to hardware
   to test it)
 - Changed control module DTS layout based on discussions with Tony, this
   includes addition of minimal l4 bus (patch #25+)
 
 Testing done for v5:
  1: am335x-evm  : boot
  2: am335x-evmsk: boot
  3: am3517-evm  : boot
  4: am43x-epos-evm  : boot
  5: am437x-gp-evm   : boot
  6: omap3-beagle-xm : boot
  7: omap3-beagle: boot, suspend (ret/off), cpuidle (ret/off)
  8: am335x-boneblack: boot
  9: am335x-bone : boot
 10: dra7xx-evm  : boot
 11: omap3-n900  : boot
 12: omap5-uevm  : boot
 13: omap4-panda-es  : boot, suspend (ret), cpuidle (ret)
 14: omap4-panda : boot
 15: omap2430-sdp: boot
 16: omap3430-sdp: boot
 17: omap4-sdp-es23plus: boot
 
 Branch available at:
 - tree: https://github.com/t-kristo/linux-pm.git
 - branch: 4.0-rc1-prcm-cleanup-v5

I found few more issues regarding diff of the dmesg before and after,
you may want to diff also dra7 before and after.

Then I just noticed this series won't boot on omap3 with the legacy mode.
You can test this by building a uImage with the following command:

$ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \
-n Linux -d arch/arm/boot/zImage /tmp/uImage

Then make sure you're not passing a .dtb file.

Below is the error I'm getting with debug_ll + earlyprintk enabled.

Regards,

Tony


[0.00] PC is at regmap_read+0x10/0x60
[0.00] LR is at clk_memmap_readl+0x34/0x54
[0.00] pc : [c03f2c88]lr : [c0035694]psr: 21d3
[0.00] sp : c08d1e90  ip :   fp : 
[0.00] r10: c07efaa8  r9 : 0040  r8 : c601c5c0
[0.00] r7 : c601bbc0  r6 : c601c5c0  r5 : 0040  r4 : 0001
[0.00] r3 : fa004000  r2 : c08d1ea4  r1 : 0040  r0 : 0040
[0.00] Flags: nzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment 
kernel
[0.00] Control: 10c5387d  Table: 80004019  DAC: 0015
[0.00] Process swapper/0 (pid: 0, stack limit = 0xc08d0218)
[0.00] Stack: (0xc08d1e90 to 0xc08d2000)
[0.00] 1e80:  c601bbc0 
c601c5c0 c0035694
[0.00] 1ea0: c6001c8c c6001c40 c07f c04d7d78  0001 
c07efaa8 c04d4dd0
[0.00] 1ec0:   c04d08c4 c115c5bc 61d3 c601bbc0 
0020 0001
[0.00] 1ee0: 0003 0013 0040 c07efaa8  c04d8284 
 c07f
[0.00] 1f00: c094e4e8 c07efaa8 c06683ec c08d1efc c7eff101 0020 
c0951fe4 0001
[0.00] 1f20:   c0951fcc c7eff140 c0965000 c04d840c 
0013 0003
[0.00] 1f40: 0001  039457c8 0040 c601bb80 c0951fcc 
c0945dac c094e504
[0.00] 1f60: c08b3280 c08a7694  c601bb80 c094e4e8 c601bb80 
c094e508 c08a77a8
[0.00] 1f80: c08aa480  c0965000  c08d28c0 c08b3280 
c7eff140 c0965000
[0.00] 1fa0:  c08aa490 c08aa480  c0965000 c086f7a4 
c08b1e58 c0863aec
[0.00] 1fc0:   c0863678   c08b3280 
c0965214 c08d296c
[0.00] 1fe0: c08b327c c08d7a0c 80004059 411fc083  8000807c 
 
[0.00] [c03f2c88] (regmap_read) from [c0035694] 
(clk_memmap_readl+0x34/0x54)
[0.00] [c0035694] (clk_memmap_readl) from [c04d7d78] 
(ti_clk_divider_recalc_rate+0x20/0xf8)
[0.00] [c04d7d78] (ti_clk_divider_recalc_rate) from [c04d4dd0] 
(clk_register+0x360/0x6f8)
[0.00] [c04d4dd0] (clk_register) from [c04d8284] 
(_register_divider.constprop.5+0xb8/0x120)
[0.00] [c04d8284] (_register_divider.constprop.5) from [c04d840c] 
(ti_clk_register_divider+0x80/0xa4)
[0.00] [c04d840c] (ti_clk_register_divider) from [c08a7694] 
(ti_clk_register_clk+0x88/0x17c)
[0.00] [c08a7694] (ti_clk_register_clk) from [c08a77a8] 
(ti_clk_register_legacy_clks+0x20/0x158)
[0.00] [c08a77a8] (ti_clk_register_legacy_clks) from [c08aa490] 
(omap3430_clk_legacy_init+0x10/0x58)
[0.00] [c08aa490] (omap3430_clk_legacy_init) from [c086f7a4] 
(omap3_sync32k_timer_init+0x8/0x58)
[0.00] [c086f7a4] (omap3_sync32k_timer_init) from [c0863aec] 
(start_kernel+0x238/0x3e8)
[0.00] [c0863aec] (start_kernel) from [8000807c] (0x8000807c)
[0.00] Code: e92d4070 e1a04000 e1a05001 e1a1 (e594117c) 
[0.00] ---[ end trace cb88537fdc8fa200 ]---

--
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  

[PATCHv2] arm: dts: omap3: Add #iommu-cells to isp and iva iommu

2015-03-30 Thread Sebastian Reichel
Add missing #iommu-cells property to the isp and iva iommu nodes. This
fixes the binding (property is required according to the generic iommu
binding) and removes the following kernel warning triggered once the
iommu nodes are referenced:

[0.647521] /ocp/isp@480bc000: could not get #iommu-cells for 
/ocp/mmu@480bd400

Signed-off-by: Sebastian Reichel s...@kernel.org
Cc: Sakari Ailus sakari.ai...@iki.fi
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
Changes since PATCHv1:

 * Also add property to mmu_iva
---
 arch/arm/boot/dts/omap3.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index fe0b293..eb96cf9 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -440,6 +440,7 @@
};
 
mmu_isp: mmu@480bd400 {
+   #iommu-cells = 0;
compatible = ti,omap2-iommu;
reg = 0x480bd400 0x80;
interrupts = 24;
@@ -448,6 +449,7 @@
};
 
mmu_iva: mmu@5d00 {
+   #iommu-cells = 0;
compatible = ti,omap2-iommu;
reg = 0x5d00 0x80;
interrupts = 28;
-- 
2.1.4

--
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: [PATCHv5 00/35] ARM: OMAP2+: PRCM/SCM cleanups against 4.0-rc

2015-03-30 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [150330 17:15]:
 Hi Tero,
 
 * Tero Kristo t-kri...@ti.com [150320 11:45]:
  Hi,
  
  v5 contains the following changes still:
  
  - re-ordered patches a bit, the single clock driver fix moved to beginning
of the set, waiting for a separate merge from Mike
  - Changed patch #23 to fix the slightly misleading logic (removed the extra 
  +1)
  - Changed patches #16 and #18 to fix OMAP2/3/4 etc. only builds
  - Fixed ti81xx boot issues (hopefully, I don't have access to hardware
to test it)
  - Changed control module DTS layout based on discussions with Tony, this
includes addition of minimal l4 bus (patch #25+)
  
  Testing done for v5:
   1: am335x-evm  : boot
   2: am335x-evmsk: boot
   3: am3517-evm  : boot
   4: am43x-epos-evm  : boot
   5: am437x-gp-evm   : boot
   6: omap3-beagle-xm : boot
   7: omap3-beagle: boot, suspend (ret/off), cpuidle (ret/off)
   8: am335x-boneblack: boot
   9: am335x-bone : boot
  10: dra7xx-evm  : boot
  11: omap3-n900  : boot
  12: omap5-uevm  : boot
  13: omap4-panda-es  : boot, suspend (ret), cpuidle (ret)
  14: omap4-panda : boot
  15: omap2430-sdp: boot
  16: omap3430-sdp: boot
  17: omap4-sdp-es23plus: boot
  
  Branch available at:
  - tree: https://github.com/t-kristo/linux-pm.git
  - branch: 4.0-rc1-prcm-cleanup-v5
 
 I found few more issues regarding diff of the dmesg before and after,
 you may want to diff also dra7 before and after.
 
 Then I just noticed this series won't boot on omap3 with the legacy mode.
 You can test this by building a uImage with the following command:
 
 $ mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 \
   -n Linux -d arch/arm/boot/zImage /tmp/uImage
 
 Then make sure you're not passing a .dtb file.
 
 Below is the error I'm getting with debug_ll + earlyprintk enabled.

Also noticed a make randconfig build warning:

arch/arm/mach-omap2/prm_common.c:702:35: warning: ‘scrm_data’ defined but not 
used [-Wunused-variable]

That seems to happen at least with the following selection:

# CONFIG_ARCH_OMAP2 is not set
# CONFIG_ARCH_OMAP3 is not set
# CONFIG_ARCH_OMAP4 is not set
# CONFIG_SOC_OMAP5 is not set
# CONFIG_SOC_AM33XX is not set
CONFIG_SOC_AM43XX=y
# CONFIG_SOC_DRA7XX is not set
CONFIG_ARCH_OMAP2PLUS=y

Regards,

Tony

 
 [0.00] PC is at regmap_read+0x10/0x60
 [0.00] LR is at clk_memmap_readl+0x34/0x54
 [0.00] pc : [c03f2c88]lr : [c0035694]psr: 21d3
 [0.00] sp : c08d1e90  ip :   fp : 
 [0.00] r10: c07efaa8  r9 : 0040  r8 : c601c5c0
 [0.00] r7 : c601bbc0  r6 : c601c5c0  r5 : 0040  r4 : 0001
 [0.00] r3 : fa004000  r2 : c08d1ea4  r1 : 0040  r0 : 0040
 [0.00] Flags: nzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment 
 kernel
 [0.00] Control: 10c5387d  Table: 80004019  DAC: 0015
 [0.00] Process swapper/0 (pid: 0, stack limit = 0xc08d0218)
 [0.00] Stack: (0xc08d1e90 to 0xc08d2000)
 [0.00] 1e80:  c601bbc0 
 c601c5c0 c0035694
 [0.00] 1ea0: c6001c8c c6001c40 c07f c04d7d78  0001 
 c07efaa8 c04d4dd0
 [0.00] 1ec0:   c04d08c4 c115c5bc 61d3 c601bbc0 
 0020 0001
 [0.00] 1ee0: 0003 0013 0040 c07efaa8  c04d8284 
  c07f
 [0.00] 1f00: c094e4e8 c07efaa8 c06683ec c08d1efc c7eff101 0020 
 c0951fe4 0001
 [0.00] 1f20:   c0951fcc c7eff140 c0965000 c04d840c 
 0013 0003
 [0.00] 1f40: 0001  039457c8 0040 c601bb80 c0951fcc 
 c0945dac c094e504
 [0.00] 1f60: c08b3280 c08a7694  c601bb80 c094e4e8 c601bb80 
 c094e508 c08a77a8
 [0.00] 1f80: c08aa480  c0965000  c08d28c0 c08b3280 
 c7eff140 c0965000
 [0.00] 1fa0:  c08aa490 c08aa480  c0965000 c086f7a4 
 c08b1e58 c0863aec
 [0.00] 1fc0:   c0863678   c08b3280 
 c0965214 c08d296c
 [0.00] 1fe0: c08b327c c08d7a0c 80004059 411fc083  8000807c 
  
 [0.00] [c03f2c88] (regmap_read) from [c0035694] 
 (clk_memmap_readl+0x34/0x54)
 [0.00] [c0035694] (clk_memmap_readl) from [c04d7d78] 
 (ti_clk_divider_recalc_rate+0x20/0xf8)
 [0.00] [c04d7d78] (ti_clk_divider_recalc_rate) from [c04d4dd0] 
 (clk_register+0x360/0x6f8)
 [0.00] [c04d4dd0] (clk_register) from [c04d8284] 
 (_register_divider.constprop.5+0xb8/0x120)
 [0.00] [c04d8284] (_register_divider.constprop.5) from [c04d840c] 
 (ti_clk_register_divider+0x80/0xa4)
 [0.00] [c04d840c] (ti_clk_register_divider) from [c08a7694] 
 (ti_clk_register_clk+0x88/0x17c)
 [0.00] [c08a7694] (ti_clk_register_clk) from [c08a77a8] 
 (ti_clk_register_legacy_clks+0x20/0x158)
 [0.00] [c08a77a8] (ti_clk_register_legacy_clks) from 

Re: [PATCH 00/25] treewide: Use bool function return values of true/false not 1/0

2015-03-30 Thread Joe Perches
On Mon, 2015-03-30 at 17:07 -0700, Casey Schaufler wrote:
 On 3/30/2015 4:45 PM, Joe Perches wrote:
  Joe Perches (25):
arm: Use bool function return values of true/false not 1/0

[etc...]

 Why, and why these in particular?

bool functions are probably better returning
bool values instead of 1 and 0.

Especially when the functions intermix returning
returning 1/0 and true/false.

(there are only a couple of those though)

These are all the remaining instances in the
kernel tree.

--
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] crypto: omap-aes: Fix support for unequal lengths

2015-03-30 Thread Lokesh Vutla
For cases where total length of an input SGs is not same as
length of the input data for encryption, omap-aes driver
crashes. This happens in the case when IPsec is trying to use
omap-aes driver.

To avoid this, we copy all the pages from the input SG list
into a contiguous buffer and prepare a single element SG list
for this buffer with length as the total bytes to crypt, which is
similar thing that is done in case of unaligned lengths.

Fixes: 6242332ff2f3 (crypto: omap-aes - Add support for cases of unaligned 
lengths)
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
 drivers/crypto/omap-aes.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 42f95a4..9a28b7e 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -554,15 +554,23 @@ static int omap_aes_crypt_dma_stop(struct omap_aes_dev 
*dd)
return err;
 }
 
-static int omap_aes_check_aligned(struct scatterlist *sg)
+static int omap_aes_check_aligned(struct scatterlist *sg, int total)
 {
+   int len = 0;
+
while (sg) {
if (!IS_ALIGNED(sg-offset, 4))
return -1;
if (!IS_ALIGNED(sg-length, AES_BLOCK_SIZE))
return -1;
+
+   len += sg-length;
sg = sg_next(sg);
}
+
+   if (len != total)
+   return -1;
+
return 0;
 }
 
@@ -633,8 +641,8 @@ static int omap_aes_handle_queue(struct omap_aes_dev *dd,
dd-in_sg = req-src;
dd-out_sg = req-dst;
 
-   if (omap_aes_check_aligned(dd-in_sg) ||
-   omap_aes_check_aligned(dd-out_sg)) {
+   if (omap_aes_check_aligned(dd-in_sg, dd-total) ||
+   omap_aes_check_aligned(dd-out_sg, dd-total)) {
if (omap_aes_copy_sgs(dd))
pr_err(Failed to copy SGs for unaligned cases\n);
dd-sgs_copied = 1;
-- 
1.9.1

--
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] crypto: omap-sham: Check for HIGHMEM before mapping SG pages

2015-03-30 Thread Lokesh Vutla
Commit 26a05489ee0e (crypto: omap-sham - Map SG pages if they are HIGHMEM 
before accessing)
says that HIGHMEM pages may not be mapped so we must
kmap them before accessing, but it doesn't check whether the
corresponding page is in highmem or not. Because of this all
the crypto tests are failing.

: d9 a1 1b 7c aa 90 3b aa 11 ab cb 25 00 b8 ac bf
[2.338169] 0010: c1 39 cd ff 48 d0 a8 e2 2b fa 33 a1
[2.344008] alg: hash: Chunking test 1 failed for omap-sha256

So Checking for HIGHMEM before mapping SG pages.

Fixes: 26a05489ee0 (crypto: omap-sham - Map SG pages if they are HIGHMEM 
before accessing)
Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
 drivers/crypto/omap-sham.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 3c76696..ace5852 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -639,13 +639,17 @@ static size_t omap_sham_append_sg(struct omap_sham_reqctx 
*ctx)
const u8 *vaddr;
 
while (ctx-sg) {
-   vaddr = kmap_atomic(sg_page(ctx-sg));
+   if (PageHighMem(sg_page(ctx-sg)))
+   vaddr = kmap_atomic(sg_page(ctx-sg));
+   else
+   vaddr = sg_virt(ctx-sg);
 
count = omap_sham_append_buffer(ctx,
vaddr + ctx-offset,
ctx-sg-length - ctx-offset);
 
-   kunmap_atomic((void *)vaddr);
+   if (PageHighMem(sg_page(ctx-sg)))
+   kunmap_atomic((void *)vaddr);
 
if (!count)
break;
-- 
1.9.1

--
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] crypto: omap-sham: Use pm_runtime_irq_safe()

2015-03-30 Thread Lokesh Vutla
omap_sham_handle_queue() can be called as part of done_task tasklet.
During this its atomic and any calls to pm functions cannot sleep.

But there is a call to pm_runtime_get_sync() (which can sleep) in
omap_sham_handle_queue(), because of which the following appears:
 [  116.169969] BUG: scheduling while atomic: kworker/0:2/2676/0x0100

Add pm_runtime_irq_safe() to avoid this.

Signed-off-by: Lokesh Vutla lokeshvu...@ti.com
---
 drivers/crypto/omap-sham.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index ace5852..81ed511 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1949,6 +1949,7 @@ static int omap_sham_probe(struct platform_device *pdev)
dd-flags |= dd-pdata-flags;
 
pm_runtime_enable(dev);
+   pm_runtime_irq_safe(dev);
pm_runtime_get_sync(dev);
rev = omap_sham_read(dd, SHA_REG_REV(dd));
pm_runtime_put_sync(pdev-dev);
-- 
1.9.1

--
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