Re: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-25 Thread Sekhar Nori
On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
> Add RTC DT entries in da850 dts file.
> 
> Signed-off-by: Mrugesh Katepallewar 
> ---
> Applies on top of v3.8-rc4 of linus tree.
> 
> Tested on da850-evm device.
> 
> Test Procedure:
> date [.]MM.DD-hh:mm[:ss]
> hwclock -w
> reset board and check system time.
> 
> :100644 100644 37dc5a3... b16efd4... March/arm/boot/dts/da850-evm.dts
> :100644 100644 640ab75... a8eb1b1... March/arm/boot/dts/da850.dtsi
>  arch/arm/boot/dts/da850-evm.dts |3 +++
>  arch/arm/boot/dts/da850.dtsi|8 
>  2 files changed, 11 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 37dc5a3..b16efd4 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -24,5 +24,8 @@
>   serial2: serial@1d0d000 {
>   status = "okay";
>   };
> + rtc@1c23000 {
> + status = "okay";
> + };
>   };
>  };
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 640ab75..a8eb1b1 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -56,5 +56,13 @@
>   interrupt-parent = <&intc>;
>   status = "disabled";
>   };
> + rtc@1c23000 {
> + compatible = "ti,da830-rtc";
> + reg = <0x23000 0x1000>;
> + interrupts = <19
> +   19>;

Why two interrupts of the same number? If there is only one interrupt
line then only one should be specified, no?

Thanks,
Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH 2/6] ARM: davinci: da850: add DT node for I2C0

2013-01-25 Thread Sekhar Nori
On 1/24/2013 5:05 PM, Vishwanathrao Badarkhe, Manish wrote:
> Add I2C0 device tree node information to da850-evm.
> Also, add I2C0 pin muxing information in da850-evm.
> 
> Signed-off-by: Vishwanathrao Badarkhe, Manish 
> ---
> Depends on patch 
> http://comments.gmane.org/gmane.linux.davinci/25993
> 
>  arch/arm/boot/dts/da850-evm.dts |   15 +++
>  arch/arm/boot/dts/da850.dtsi|   10 ++
>  2 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index 8cac9d2..3d8290a 100755
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -27,5 +27,20 @@
>   serial2: serial@1d0d000 {
>   status = "okay";
>   };
> + i2c0@1c22000 {

This should be
i2c0: i2c@1c22000

to follow the convention elsewhere in file.

> + status = "okay";
> + };
> + };
> +};
> +&pmx_core {
> + pinctrl-names = "default";
> + pinctrl-0 = <
> + &i2c0_pins
> + >;
> +
> + i2c0_pins: pinmux_i2c0_pins{
> + pinctrl-single,bits = <
> + 0x10 0x2200 0xff00  /* I2C0_SDA,I2C0_SCL */
> + >;

This should go into the dtsi file. See the discussion on NAND DT support
submitted by Anil Kumar.

Thanks,
Sekhar

PS: You are using an old address for Kevin Hilman. The MAINTAINERS file
has been updated for a long time now. Liam's address is also wrong but I
don't have his updated e-mail.
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-25 Thread Katepallewar, Mrugesh
On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
> On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
> > Add RTC DT entries in da850 dts file.
> > 
> > Signed-off-by: Mrugesh Katepallewar 
> > ---
> > Applies on top of v3.8-rc4 of linus tree.
> > 
> > Tested on da850-evm device.
> > 
> > Test Procedure:
> > date [.]MM.DD-hh:mm[:ss]
> > hwclock -w
> > reset board and check system time.
> > 
> > :100644 100644 37dc5a3... b16efd4... M  arch/arm/boot/dts/da850-evm.dts
> > :100644 100644 640ab75... a8eb1b1... M  arch/arm/boot/dts/da850.dtsi
> >  arch/arm/boot/dts/da850-evm.dts |3 +++
> >  arch/arm/boot/dts/da850.dtsi|8 
> >  2 files changed, 11 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/da850-evm.dts 
> > b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
> > --- a/arch/arm/boot/dts/da850-evm.dts
> > +++ b/arch/arm/boot/dts/da850-evm.dts
> > @@ -24,5 +24,8 @@
> > serial2: serial@1d0d000 {
> > status = "okay";
> > };
> > +   rtc@1c23000 {
> > +   status = "okay";
> > +   };
> > };
> >  };
> > diff --git a/arch/arm/boot/dts/da850.dtsi 
> > b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
> > --- a/arch/arm/boot/dts/da850.dtsi
> > +++ b/arch/arm/boot/dts/da850.dtsi
> > @@ -56,5 +56,13 @@
> > interrupt-parent = <&intc>;
> > status = "disabled";
> > };
> > +   rtc@1c23000 {
> > +   compatible = "ti,da830-rtc";
> > +   reg = <0x23000 0x1000>;
> > +   interrupts = <19
> > + 19>;
> 
> Why two interrupts of the same number? If there is only one interrupt line 
> then only one should be specified, no?
We are using common OMAP RTC driver for da850 and other ti SoC's (e.g.am33xx). 
I have seen in am33xx.dtsi rtc timer
and alarm interrupts are different. So, two interrupt numbers are expected from 
RTC DT node.
> 
> Thanks,
> Sekhar
> 


Regards, 
Mrugesh
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH] ARM: davinci: da850: add interrupt-parent property in soc node

2013-01-25 Thread Prabhakar Lad
From: Lad, Prabhakar 

This patch adds 'interrupt-parent' property in soc node, so that
the child inherits this property, this avoids adding 'interrupt-parent'
to each node.

Signed-off-by: Lad, Prabhakar 
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-ker...@vger.kernel.org
Cc: davinci-linux-open-source@linux.davincidsp.com
Cc: devicetree-disc...@lists.ozlabs.org
Cc: Sekhar Nori 
Cc: Heiko Schocher 
---
 arch/arm/boot/dts/da850.dtsi |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 2551098..7c84822 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -28,6 +28,7 @@
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x01c0 0x40>;
+   interrupt-parent = <&intc>;
 
pmx_core: pinmux@1c14120 {
compatible = "pinctrl-single";
@@ -62,7 +63,6 @@
clock-frequency = <15000>;
reg-shift = <2>;
interrupts = <25>;
-   interrupt-parent = <&intc>;
status = "disabled";
};
serial1: serial@1d0c000 {
@@ -71,7 +71,6 @@
clock-frequency = <15000>;
reg-shift = <2>;
interrupts = <53>;
-   interrupt-parent = <&intc>;
status = "disabled";
};
serial2: serial@1d0d000 {
@@ -80,7 +79,6 @@
clock-frequency = <15000>;
reg-shift = <2>;
interrupts = <61>;
-   interrupt-parent = <&intc>;
status = "disabled";
};
};
-- 
1.7.4.1

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH] ARM: davinci: da850: add RTC driver DT entries

2013-01-25 Thread Sekhar Nori
On 1/25/2013 4:34 PM, Katepallewar, Mrugesh wrote:
> On Fri, Jan 25, 2013 at 16:04:22, Nori, Sekhar wrote:
>> On 1/25/2013 11:43 AM, Mrugesh Katepallewar wrote:
>>> Add RTC DT entries in da850 dts file.
>>>
>>> Signed-off-by: Mrugesh Katepallewar 
>>> ---
>>> Applies on top of v3.8-rc4 of linus tree.
>>>
>>> Tested on da850-evm device.
>>>
>>> Test Procedure:
>>> date [.]MM.DD-hh:mm[:ss]
>>> hwclock -w
>>> reset board and check system time.
>>>
>>> :100644 100644 37dc5a3... b16efd4... M  arch/arm/boot/dts/da850-evm.dts
>>> :100644 100644 640ab75... a8eb1b1... M  arch/arm/boot/dts/da850.dtsi
>>>  arch/arm/boot/dts/da850-evm.dts |3 +++
>>>  arch/arm/boot/dts/da850.dtsi|8 
>>>  2 files changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/da850-evm.dts 
>>> b/arch/arm/boot/dts/da850-evm.dts index 37dc5a3..b16efd4 100644
>>> --- a/arch/arm/boot/dts/da850-evm.dts
>>> +++ b/arch/arm/boot/dts/da850-evm.dts
>>> @@ -24,5 +24,8 @@
>>> serial2: serial@1d0d000 {
>>> status = "okay";
>>> };
>>> +   rtc@1c23000 {

I did not mention this last time, but this should be:

rtc0: rtc@1c23000 {

to be consistent with rest of the file.

>>> +   status = "okay";
>>> +   };
>>> };
>>>  };
>>> diff --git a/arch/arm/boot/dts/da850.dtsi 
>>> b/arch/arm/boot/dts/da850.dtsi index 640ab75..a8eb1b1 100644
>>> --- a/arch/arm/boot/dts/da850.dtsi
>>> +++ b/arch/arm/boot/dts/da850.dtsi
>>> @@ -56,5 +56,13 @@
>>> interrupt-parent = <&intc>;
>>> status = "disabled";
>>> };
>>> +   rtc@1c23000 {

Here too.

>>> +   compatible = "ti,da830-rtc";
>>> +   reg = <0x23000 0x1000>;
>>> +   interrupts = <19
>>> + 19>;
>>
>> Why two interrupts of the same number? If there is only one interrupt line 
>> then only one should be specified, no?
> We are using common OMAP RTC driver for da850 and other ti SoC's 
> (e.g.am33xx). I have seen in am33xx.dtsi rtc timer
> and alarm interrupts are different. So, two interrupt numbers are expected 
> from RTC DT node.

Okay. Looking at the OMAP-L138 TRM, I see that the IP on that SoC
supports both alarm and timer events and both arrive on the same
interrupt number (as opposed to am335x where they supposedly arrive on
different interrupt lines). What you have looks fine to me considering
this.

Also, the interrupt-parent setting needs to be removed. See the patch
Prabhakar just submitted.

Thanks,
Sekhar
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH 1/2] media: add support for decoder subdevs along with sensor and others

2013-01-25 Thread Sylwester Nawrocki

Hi Prahakar,

On 01/25/2013 08:01 AM, Prabhakar Lad wrote:

From: Manjunath Hadli

A lot of SOCs including Texas Instruments Davinci family mainly use
video decoders as input devices. Here the initial subdevice node
from where the input really comes is this decoder, for which support
is needed as part of the Media Controller infrastructure. This patch
adds an additional flag to include the decoders along with others,
such as the sensor and lens.

Signed-off-by: Manjunath Hadli
Signed-off-by: Lad, Prabhakar
---
  include/uapi/linux/media.h |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
index 0ef8833..fa44ed9 100644
--- a/include/uapi/linux/media.h
+++ b/include/uapi/linux/media.h
@@ -56,6 +56,7 @@ struct media_device_info {
  #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR(MEDIA_ENT_T_V4L2_SUBDEV + 1)
  #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
  #define MEDIA_ENT_T_V4L2_SUBDEV_LENS  (MEDIA_ENT_T_V4L2_SUBDEV + 3)
+#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER(MEDIA_ENT_T_V4L2_SUBDEV + 4)


Such a new entity type needs to be documented in the media DocBook [1].
It probably also deserves a comment here, as DECODER isn't that obvious
like the other already existing entity types. I heard people referring
to a device that encodes analog (composite) video signal into its digital
representation as an ENCODER. :)


[1] http://hverkuil.home.xs4all.nl/spec/media.html#media-ioc-enum-entities

--

Regards,
Sylwester
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v6 0/2] ARM: davinci: remoteproc support

2013-01-25 Thread Robert Tivy
This patch series adds remoteproc support for OMAP-L138, along with needed
supporting mach-davinci infrastructure.

These patches are based on Linus' commit tagged v3.8-rc3 (commit id
9931faca02c604c22335f5a935a501bb2ace6e20)

Some notes for reviewers...

DOCUMENTATION maintainers: patch 2/2 in this series contains a change to
kernel-parameters.txt that adds a description for a new kernel command-line
parameter, along with the code that defines the new kernel command-line
parameter.  You are, of course, free to look at the whole series, but only
patch 2/2 is of particular interest.

This is actually a subset of the complete patch series, since the other
patches in this set have already been committed to a staging area by the
tree maintainer.

Robert Tivy (2):
  ARM: davinci: Remoteproc driver support for OMAP-L138 DSP
  ARM: davinci: Remoteproc platform device creation data/code

 Documentation/kernel-parameters.txt|6 +
 arch/arm/mach-davinci/devices-da8xx.c  |   92 ++-
 arch/arm/mach-davinci/include/mach/da8xx.h |5 +
 drivers/remoteproc/Kconfig |   26 ++-
 drivers/remoteproc/Makefile|1 +
 drivers/remoteproc/da8xx_remoteproc.c  |  327 
 drivers/remoteproc/remoteproc_core.c   |   22 +-
 7 files changed, 479 insertions(+), 6 deletions(-)
 create mode 100644 drivers/remoteproc/da8xx_remoteproc.c

-- 
1.7.9.4

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


[PATCH v6 1/2] ARM: davinci: Remoteproc driver support for OMAP-L138 DSP

2013-01-25 Thread Robert Tivy
Adding a remoteproc driver implementation for OMAP-L138 DSP

diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
index 96ce101..e923599 100644
--- a/drivers/remoteproc/Kconfig
+++ b/drivers/remoteproc/Kconfig
@@ -5,7 +5,7 @@ config REMOTEPROC
tristate
depends on EXPERIMENTAL
depends on HAS_DMA
-   select FW_CONFIG
+   select FW_LOADER
select VIRTIO
 
 config OMAP_REMOTEPROC
@@ -41,4 +41,28 @@ config STE_MODEM_RPROC
  This can be either built-in or a loadable module.
  If unsure say N.
 
+config DA8XX_REMOTEPROC
+   tristate "DaVinci DA850/OMAPL138 remoteproc support (EXPERIMENTAL)"
+   depends on ARCH_DAVINCI_DA850
+   select REMOTEPROC
+   select RPMSG
+   select CMA
+   default n
+   help
+ Say y here to support DaVinci DA850/OMAPL138 remote processors
+ via the remote processor framework.
+
+ You want to say y here in order to enable AMP
+ use-cases to run on your platform (multimedia codecs are
+ offloaded to remote DSP processors using this framework).
+
+ This module controls the name of the firmware file that gets
+ loaded on the DSP.  This file must reside in the /lib/firmware
+ directory.  It can be specified via the module parameter
+ da8xx_fw_name=, and if not specified will default to
+ "rproc-dsp-fw".
+
+ It's safe to say n here if you're not interested in multimedia
+ offloading or just want a bare minimum kernel.
+
 endmenu
diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
index 391b651..ac2ff75 100644
--- a/drivers/remoteproc/Makefile
+++ b/drivers/remoteproc/Makefile
@@ -9,3 +9,4 @@ remoteproc-y+= remoteproc_virtio.o
 remoteproc-y   += remoteproc_elf_loader.o
 obj-$(CONFIG_OMAP_REMOTEPROC)  += omap_remoteproc.o
 obj-$(CONFIG_STE_MODEM_RPROC)  += ste_modem_rproc.o
+obj-$(CONFIG_DA8XX_REMOTEPROC) += da8xx_remoteproc.o
diff --git a/drivers/remoteproc/da8xx_remoteproc.c 
b/drivers/remoteproc/da8xx_remoteproc.c
new file mode 100644
index 000..c6eb6bf
--- /dev/null
+++ b/drivers/remoteproc/da8xx_remoteproc.c
@@ -0,0 +1,327 @@
+/*
+ * Remote processor machine-specific module for DA8XX
+ *
+ * Copyright (C) 2013 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
+ * version 2 as published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include/* for davinci_clk_reset_assert/deassert() */
+
+#include "remoteproc_internal.h"
+
+static char *da8xx_fw_name;
+module_param(da8xx_fw_name, charp, S_IRUGO);
+MODULE_PARM_DESC(da8xx_fw_name,
+   "\n\t\tName of DSP firmware file in /lib/firmware");
+
+/*
+ * OMAP-L138 Technical References:
+ * http://www.ti.com/product/omap-l138
+ */
+#define SYSCFG_CHIPSIG_OFFSET 0x174
+#define SYSCFG_CHIPSIG_CLR_OFFSET 0x178
+#define SYSCFG_CHIPINT0 BIT(0)
+#define SYSCFG_CHIPINT1 BIT(1)
+#define SYSCFG_CHIPINT2 BIT(2)
+#define SYSCFG_CHIPINT3 BIT(3)
+
+/**
+ * struct da8xx_rproc - da8xx remote processor instance state
+ * @rproc: rproc handle
+ * @dsp_clk: placeholder for platform's DSP clk
+ * @ack_fxn: chip-specific ack function for ack'ing irq
+ * @irq_data: ack_fxn function parameter
+ * @chipsig: virt ptr to DSP interrupt registers (CHIPSIG & CHIPSIG_CLR)
+ * @bootreg: virt ptr to DSP boot address register (HOST1CFG)
+ * @irq: irq # used by this instance
+ */
+struct da8xx_rproc {
+   struct rproc *rproc;
+   struct clk *dsp_clk;
+   void (*ack_fxn)(struct irq_data *data);
+   struct irq_data *irq_data;
+   void __iomem *chipsig;
+   void __iomem *bootreg;
+   int irq;
+};
+
+/**
+ * handle_event() - inbound virtqueue message workqueue function
+ *
+ * This function is registered as a kernel thread and is scheduled by the
+ * kernel handler.
+ */
+static irqreturn_t handle_event(int irq, void *p)
+{
+   struct rproc *rproc = (struct rproc *)p;
+
+   /* Process incoming buffers on our vring */
+   while (IRQ_HANDLED == rproc_vq_interrupt(rproc, 0))
+   ;
+
+   /* Must allow wakeup of potenitally blocking senders */
+   rproc_vq_interrupt(rproc, 1);
+
+   return IRQ_HANDLED;
+}
+
+/**
+ * da8xx_rproc_callback() - inbound virtqueue message handler
+ *
+ * This handler is invoked directly by the kernel whenever the remote
+ * core (DSP) has modified the state of a virtqueue.  There is no
+ * "payload" message indicating the virtqueue index as is the case with
+ * mailbox-based implementations on OMAP4.  As such, this handler "polls"
+ * each known virtqueue index for every invocation.
+ */
+static irqreturn_t da8xx_rproc_callback(int irq, void *p)
+{
+   struct rproc *rproc = (struct rproc *)p;
+

[PATCH v6 2/2] ARM: davinci: Remoteproc platform device creation data/code

2013-01-25 Thread Robert Tivy
Added a new remoteproc platform device for DA8XX.  Contains CMA-based
reservation of physical memory block.  A new kernel command-line
parameter has been added to allow boot-time specification of the
physical memory block.

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index 363e348..f7ba70f3 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -44,6 +44,7 @@ parameter is applicable:
AVR32   AVR32 architecture is enabled.
AX25Appropriate AX.25 support is enabled.
BLACKFIN Blackfin architecture is enabled.
+   CMA Contiguous Memory Area support is enabled.
DRM Direct Rendering Management support is enabled.
DYNAMIC_DEBUG Build in debug messages and enable them at runtime
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
@@ -2634,6 +2635,11 @@ bytes respectively. Such letter suffixes can also be 
entirely omitted.
Useful for devices that are detected asynchronously
(e.g. USB and MMC devices).
 
+   rproc_mem=nn[KMG][@address]
+   [KNL,ARM,CMA] Remoteproc physical memory block.
+   Memory area to be used by remote processor image,
+   managed by CMA.
+
rw  [KNL] Mount root device read-write on boot
 
S   [KNL] Run init in single mode
diff --git a/arch/arm/mach-davinci/devices-da8xx.c 
b/arch/arm/mach-davinci/devices-da8xx.c
index fb2f51b..a455e5c 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -12,7 +12,7 @@
  */
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -706,6 +706,96 @@ int __init da850_register_mmcsd1(struct davinci_mmc_config 
*config)
 }
 #endif
 
+static struct resource da8xx_rproc_resources[] = {
+   { /* DSP boot address */
+   .start  = DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG,
+   .end= DA8XX_SYSCFG0_BASE + DA8XX_HOST1CFG_REG + 3,
+   .flags  = IORESOURCE_MEM,
+   },
+   { /* DSP interrupt registers */
+   .start  = DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG,
+   .end= DA8XX_SYSCFG0_BASE + DA8XX_CHIPSIG_REG + 7,
+   .flags  = IORESOURCE_MEM,
+   },
+   { /* dsp irq */
+   .start  = IRQ_DA8XX_CHIPINT0,
+   .end= IRQ_DA8XX_CHIPINT0,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+static struct platform_device da8xx_dsp = {
+   .name   = "davinci-rproc",
+   .id = 0,
+   .dev= {
+   .coherent_dma_mask  = DMA_BIT_MASK(32),
+   },
+   .num_resources  = ARRAY_SIZE(da8xx_rproc_resources),
+   .resource   = da8xx_rproc_resources,
+};
+
+#if IS_ENABLED(CONFIG_DA8XX_REMOTEPROC)
+
+static phys_addr_t rproc_base __initdata;
+static unsigned long rproc_size __initdata;
+
+static int __init early_rproc_mem(char *p)
+{
+   char *endp;
+
+   if (p == NULL)
+   return 0;
+
+   rproc_size = memparse(p, &endp);
+   if (*endp == '@')
+   rproc_base = memparse(endp + 1, NULL);
+
+   return 0;
+}
+early_param("rproc_mem", early_rproc_mem);
+
+void __init da8xx_rproc_reserve_cma(void)
+{
+   int ret;
+
+   if (!rproc_base || !rproc_size) {
+   pr_err("%s: 'rproc_mem=nn@address' badly specified\n"
+  "'nn' and 'address' must both be non-zero\n",
+  __func__);
+
+   return;
+   }
+
+   pr_info("%s: reserving 0x%lx @ 0x%lx...\n",
+   __func__, rproc_size, (unsigned long)rproc_base);
+
+   ret = dma_declare_contiguous(&da8xx_dsp.dev, rproc_size, rproc_base, 0);
+   if (ret)
+   pr_err("%s: dma_declare_contiguous failed %d\n", __func__, ret);
+}
+
+#else
+
+void __init da8xx_rproc_reserve_cma(void)
+{
+}
+
+#endif
+
+int __init da8xx_register_rproc(void)
+{
+   int ret;
+
+   ret = platform_device_register(&da8xx_dsp);
+   if (ret) {
+   pr_err("%s: platform_device_register: %d\n", __func__, ret);
+
+   return ret;
+   }
+
+   return 0;
+};
+
 static struct resource da8xx_rtc_resources[] = {
{
.start  = DA8XX_RTC_BASE,
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h 
b/arch/arm/mach-davinci/include/mach/da8xx.h
index 700d311..1fcb106 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -54,6 +54,8 @@ extern unsigned int da850_max_speed;
 #define DA8XX_SYSCFG0_BASE (IO_PHYS + 0x14000)
 #define DA8XX_SYSCFG0_VIRT(x)  (da8xx_syscfg0_base + (x))
 #define DA8XX_JTAG_ID_REG  0x18
+#define DA8XX_HOST1CFG_REG 0x44
+#define DA8XX_CHIPSIG_REG  0x174
 #define DA8XX_CFGCHIP0_REG 0x17

Re: [PATCH 1/2] media: add support for decoder subdevs along with sensor and others

2013-01-25 Thread Prabhakar Lad
Hi Sylwester,

On Sat, Jan 26, 2013 at 1:24 AM, Sylwester Nawrocki
 wrote:
> Hi Prahakar,
>
>
> On 01/25/2013 08:01 AM, Prabhakar Lad wrote:
>>
>> From: Manjunath Hadli
>>
>> A lot of SOCs including Texas Instruments Davinci family mainly use
>> video decoders as input devices. Here the initial subdevice node
>> from where the input really comes is this decoder, for which support
>> is needed as part of the Media Controller infrastructure. This patch
>> adds an additional flag to include the decoders along with others,
>> such as the sensor and lens.
>>
>> Signed-off-by: Manjunath Hadli
>> Signed-off-by: Lad, Prabhakar
>> ---
>>   include/uapi/linux/media.h |1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h
>> index 0ef8833..fa44ed9 100644
>> --- a/include/uapi/linux/media.h
>> +++ b/include/uapi/linux/media.h
>> @@ -56,6 +56,7 @@ struct media_device_info {
>>   #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR(MEDIA_ENT_T_V4L2_SUBDEV +
>> 1)
>>   #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH (MEDIA_ENT_T_V4L2_SUBDEV + 2)
>>   #define MEDIA_ENT_T_V4L2_SUBDEV_LENS  (MEDIA_ENT_T_V4L2_SUBDEV + 3)
>> +#define MEDIA_ENT_T_V4L2_SUBDEV_DECODER(MEDIA_ENT_T_V4L2_SUBDEV +
>> 4)
>
>
> Such a new entity type needs to be documented in the media DocBook [1].
> It probably also deserves a comment here, as DECODER isn't that obvious
> like the other already existing entity types. I heard people referring
> to a device that encodes analog (composite) video signal into its digital
> representation as an ENCODER. :)
>
>
Thanks for pointing it :), I'll document it and post a v2.

Regards,
--Prabhakar Lad

> [1] http://hverkuil.home.xs4all.nl/spec/media.html#media-ioc-enum-entities
>
> --
>
> Regards,
> Sylwester
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: [PATCH 5/6] ARM: regulator: add tps6507x device tree data

2013-01-25 Thread Mark Brown
On Fri, Jan 25, 2013 at 06:29:49AM +, Vishwanathrao Badarkhe, Manish wrote:
> On Thu, Jan 24, 2013 at 17:30:51, Mark Brown wrote:

> I too doubt that whether it should be in architecture specific folder,

> My code is in reference to below patch:
> arm/dts: regulator: Add tps65910 device tree 
> data(d5d08e2e1672da627d7c9d34a9dc1089c653e23a)

> Could you please suggest me if it can be moved somewhere else?

We should have somewhere to put this sort of generic stuff, yes.  Not
sure where, possibly under drivers/of or some non-drivers part of the
tree.


signature.asc
Description: Digital signature
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source