* [PATCH v3 3/3] arm: omap2: gpmc: add DT bindings for OneNAND
From: Ezequiel Garcia @ 2013-01-25 12:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359116591-32730-1-git-send-email-ezequiel.garcia@free-electrons.com>
This patch adds device tree bindings for OMAP OneNAND devices.
Tested on an OMAP3 3430 IGEPv2 board.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
Changes from v2:
* Remove unneeded of_node_put() as reported by Mark Rutland
Changes from v1:
* Fix typo in Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
.../devicetree/bindings/mtd/gpmc-onenand.txt | 43 +++++++++++++++++++
arch/arm/mach-omap2/gpmc.c | 45 ++++++++++++++++++++
2 files changed, 88 insertions(+), 0 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
new file mode 100644
index 0000000..deec9da
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt
@@ -0,0 +1,43 @@
+Device tree bindings for GPMC connected OneNANDs
+
+GPMC connected OneNAND (found on OMAP boards) are represented as child nodes of
+the GPMC controller with a name of "onenand".
+
+All timing relevant properties as well as generic gpmc child properties are
+explained in a separate documents - please refer to
+Documentation/devicetree/bindings/bus/ti-gpmc.txt
+
+Required properties:
+
+ - reg: The CS line the peripheral is connected to
+
+Optional properties:
+
+ - dma-channel: DMA Channel index
+
+For inline partiton table parsing (optional):
+
+ - #address-cells: should be set to 1
+ - #size-cells: should be set to 1
+
+Example for an OMAP3430 board:
+
+ gpmc: gpmc at 6e000000 {
+ compatible = "ti,omap3430-gpmc";
+ ti,hwmods = "gpmc";
+ reg = <0x6e000000 0x1000000>;
+ interrupts = <20>;
+ gpmc,num-cs = <8>;
+ gpmc,num-waitpins = <4>;
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ onenand at 0 {
+ reg = <0 0 0>; /* CS0, offset 0 */
+
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ /* partitions go here */
+ };
+ };
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index c6255f7..0636d0a 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -39,6 +39,7 @@
#include "omap_device.h"
#include "gpmc.h"
#include "gpmc-nand.h"
+#include "gpmc-onenand.h"
#define DEVICE_NAME "omap-gpmc"
@@ -1259,6 +1260,43 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
}
#endif
+#ifdef CONFIG_MTD_ONENAND
+static int gpmc_probe_onenand_child(struct platform_device *pdev,
+ struct device_node *child)
+{
+ u32 val;
+ struct omap_onenand_platform_data *gpmc_onenand_data;
+
+ if (of_property_read_u32(child, "reg", &val) < 0) {
+ dev_err(&pdev->dev, "%s has no 'reg' property\n",
+ child->full_name);
+ return -ENODEV;
+ }
+
+ gpmc_onenand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_onenand_data),
+ GFP_KERNEL);
+ if (!gpmc_onenand_data)
+ return -ENOMEM;
+
+ gpmc_onenand_data->cs = val;
+ gpmc_onenand_data->of_node = child;
+ gpmc_onenand_data->dma_channel = -1;
+
+ if (!of_property_read_u32(child, "dma-channel", &val))
+ gpmc_onenand_data->dma_channel = val;
+
+ gpmc_onenand_init(gpmc_onenand_data);
+
+ return 0;
+}
+#else
+static int gpmc_probe_onenand_child(struct platform_device *pdev,
+ struct device_node *child)
+{
+ return 0;
+}
+#endif
+
static int gpmc_probe_dt(struct platform_device *pdev)
{
int ret;
@@ -1277,6 +1315,13 @@ static int gpmc_probe_dt(struct platform_device *pdev)
}
}
+ for_each_node_by_name(child, "onenand") {
+ ret = gpmc_probe_onenand_child(pdev, child);
+ if (ret < 0) {
+ of_node_put(child);
+ return ret;
+ }
+ }
return 0;
}
#else
--
1.7.8.6
^ permalink raw reply related
* [PATCH v3 2/3] arm: omap2: gpmc-onenand: drop __init annotation
From: Ezequiel Garcia @ 2013-01-25 12:23 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359116591-32730-1-git-send-email-ezequiel.garcia@free-electrons.com>
gpmc_onenand_init() will be called from another driver's probe() function,
so drop the __init annotation, in order to prevent section mismatches.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
arch/arm/mach-omap2/gpmc-onenand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 94a349e..fadd8743 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -356,7 +356,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr)
return ret;
}
-void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
+void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
{
int err;
--
1.7.8.6
^ permalink raw reply related
* [PATCH v3 1/3] mtd: omap-onenand: pass device_node in platform data
From: Ezequiel Garcia @ 2013-01-25 12:23 UTC (permalink / raw)
To: linux-arm-kernel
Pass an optional device_node pointer in the platform data,
which in turn will be put into a mtd_part_parser_data.
This way, code that sets up the platform devices can pass
along the node from DT so that the partitions can be parsed.
For non-DT boards, this change has no effect.
Acked-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
drivers/mtd/onenand/omap2.c | 4 +++-
include/linux/platform_data/mtd-onenand-omap2.h | 3 +++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 065f3fe..eec2aed 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -637,6 +637,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)
struct onenand_chip *this;
int r;
struct resource *res;
+ struct mtd_part_parser_data ppdata = {};
pdata = pdev->dev.platform_data;
if (pdata == NULL) {
@@ -767,7 +768,8 @@ static int omap2_onenand_probe(struct platform_device *pdev)
if ((r = onenand_scan(&c->mtd, 1)) < 0)
goto err_release_regulator;
- r = mtd_device_parse_register(&c->mtd, NULL, NULL,
+ ppdata.of_node = pdata->of_node;
+ r = mtd_device_parse_register(&c->mtd, NULL, &ppdata,
pdata ? pdata->parts : NULL,
pdata ? pdata->nr_parts : 0);
if (r)
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h
index 685af7e..e9a9fb1 100644
--- a/include/linux/platform_data/mtd-onenand-omap2.h
+++ b/include/linux/platform_data/mtd-onenand-omap2.h
@@ -29,5 +29,8 @@ struct omap_onenand_platform_data {
u8 flags;
u8 regulator_can_sleep;
u8 skip_initial_unlocking;
+
+ /* for passing the partitions */
+ struct device_node *of_node;
};
#endif
--
1.7.8.6
^ permalink raw reply related
* [PATCH 1/2] ARM: dts: omap3-overo: Add support for pwm-leds
From: Florian Vaussard @ 2013-01-25 12:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <5102756A.9040901@ti.com>
>>
>> We have two drivers at the moment: pwm-twl and pwm-twl-led. However new out of
>> SoC PWM drivers might come (for example for palmas). So it worth take a look
>> at some generic implementation.
>
> OK. So I have the series. I need to add few more things but pwm-leds on
> BeagleBoard works fine when I put the default_trigger for the pmustat LED to
> be mmc0. It is blinking happily ;)
> I'll CC you with the patches when I send them.
>
I sent a patchset 2 hours ago with you in CC, you haven't received them?
Cheers,
Florian
^ permalink raw reply
* [PATCH] ARM: omap2: gpmc: Remove unneeded of_node_put()
From: Ezequiel Garcia @ 2013-01-25 12:19 UTC (permalink / raw)
To: linux-arm-kernel
for_each_node_by_name() automatically calls of_node_put() on each
node passed; so don't do it explicitly unless there's an error.
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
arch/arm/mach-omap2/gpmc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 01ce462..c6255f7 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1271,9 +1271,10 @@ static int gpmc_probe_dt(struct platform_device *pdev)
for_each_node_by_name(child, "nand") {
ret = gpmc_probe_nand_child(pdev, child);
- of_node_put(child);
- if (ret < 0)
+ if (ret < 0) {
+ of_node_put(child);
return ret;
+ }
}
return 0;
--
1.7.8.6
^ permalink raw reply related
* [PATCH v2 0/6] ARM: dts: omap: add dt data for dwc3
From: Felipe Balbi @ 2013-01-25 12:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Hi,
On Fri, Jan 25, 2013 at 04:41:46PM +0530, Kishon Vijay Abraham I wrote:
> This patch series adds dt data to get dwc3 working in omap5.
>
> Changes from v1:
> * rename "ctrl_module" to "ctrl-module" and "usb_phy" to "usb-phy"
>
> This patch series is developed on
> git://github.com/rrnayak/linux.git omap5-3.8-rc4-base-palmas
>
> This is the last series of the series of patches.
> I've kept everything in a single branch
> git://gitorious.org/linux-usb/linux-usb.git omap5-with-palmas
> (changes up to 23b4dfa2ab7052569cd88acc6383c4b1a8e8a482)
>
> Did enumeration testing on omap5 evm.
I have gone quickly through this series and it looks already to me:
Reviewied-by: Felipe Balbi <balbi@ti.com>
> Kishon Vijay Abraham I (6):
> ARM: dts: omap5: Add omap control usb data
> ARM: dts: omap5: Add ocp2scp data
> ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
> ARM: dts: omap5: add dwc3 omap dt data
> ARM: dts: omap5: add dwc3 core dt data
> ARM: dts: palmas: update dt data for palmas-usb
>
> arch/arm/boot/dts/omap5.dtsi | 48 +++++++++++++++++++++++++++++++++++++++++
> arch/arm/boot/dts/palmas.dtsi | 4 ++--
> 2 files changed, 50 insertions(+), 2 deletions(-)
>
> --
> 1.7.9.5
>
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130125/31536255/attachment.sig>
^ permalink raw reply
* [PATCH v2 1/4] ARM: OMAP2+: dpll: round rate to closest value
From: Mohammed, Afzal @ 2013-01-25 12:18 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <alpine.DEB.2.00.1301250816010.471@utopia.booyaka.com>
Hi Paul,
On Fri, Jan 25, 2013 at 13:48:11, Paul Walmsley wrote:
> On Wed, 23 Jan 2013, Afzal Mohammed wrote:
> > Currently round rate function would return proper rate iff requested
> > rate exactly matches the PLL lockable rate. This causes set_rate to
> > fail if exact rate could not be set. Instead round rate may return
> > closest rate possible (less than the requested). And if any user is
> > badly in need of exact rate, then return value of round rate could
> > be used to decide whether to invoke set rate or not.
> >
> > Modify round rate so that it return closest possible rate.
>
> This doesn't look like the right approach to me. For some PLLs, an exact
> rate is desired.
If exact rate is required, there is a way to achieve it as mentioned
in the commit message, i.e. by first invoking round rate over reqd. rate
and if it doesn't match, bail out w/o invoking set_rate.
And it seems requirement of CCF w.r.t to round rate is to return closest
possible rate.
> We removed the rate tolerance code in commit
> 241d3a8dca239610d3d991bf58d4fe38c2d86fd5, but that was probably premature.
> We've encountered several situations now where we could really use it,
> like MPU CPUFreq. I'd suggest reverting
> 241d3a8dca239610d3d991bf58d4fe38c2d86fd5 or using a similar approach.
As you prefer reverting the above commit, I will proceed so, hmm.. got
not so simple merge conflict, wish there was a command,
git revert logical ..
Regards
Afzal
^ permalink raw reply
* [RESEND PATCH v5 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles
From: Alexander Shishkin @ 2013-01-25 12:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130125033013.GB29795@nchen-desktop>
Peter Chen <peter.chen@freescale.com> writes:
> On Thu, Jan 24, 2013 at 04:35:30PM +0200, Alexander Shishkin wrote:
>> Peter Chen <peter.chen@freescale.com> writes:
>>
>> > - Create init/destroy API for probe and remove
>> > - start/stop API are only used otg id switch process
>> > - Create the gadget at ci_hdrc_probe if the gadget is supported
>> > at that port, the main purpose for this is to avoid gadget module
>> > load fail at init.rc
>>
>> I don't think it's necessary to mention android-specific init scripts
>> here in our patches.
>
> Ok, will just mention init script.
>>
>> >
>> > +static inline void ci_role_destroy(struct ci13xxx *ci)
>> > +{
>> > + enum ci_role role = ci->role;
>> > +
>> > + if (role == CI_ROLE_END)
>> > + return;
>> > +
>> > + ci->role = CI_ROLE_END;
>> > +
>> > + ci->roles[role]->destroy(ci);
>> > +}
>>
>> What does this do? It should take role an a parameter, at least. Or it
>> can be called ci_roles_destroy() and, well, destroy all the roles. Now
>> we're in a situation where we destroy one.
> Yes, this function has some problems, I suggest just call two lines at
> ci_role_destory, do you think so?
>
> ci->roles[role]->destroy(ci);
> ci->role = CI_ROLE_END;
I just don't see why it's needed at all. See below.
>>
>> The idea is that, with this api, we can (and should) have both roles
>> allocated all the time, but only one role start()'ed.
>>
>> What we can do here is move the udc's .init() code to
>> ci_hdrc_gadget_init() and add a complementary ci_hdrc_gadget_destroy(),
>> which we call in ci_hdrc_remove() and probe's error path. And we can
>> probably do something similar for the host, or just leave it as it is
>> now. Seems simpler to me.
> Yes, current code has bug that it should call ci_role_destroy at probe's
> error path.
> For your comments, it still needs to add destory function for udc which will
> be called at core.c. I still prefer current way due to below reasons:
>
> - It can keep ci_hdrc_gadget_init() clean
> - .init and .remove are different logical function with .start and .stop.
> The .init and .remove are used for create and destroy, .start and .stop
> are used at id role switch.
True, and we can keep it that way: (again, untested)
---cut---
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
index 342b430..36f495a 100644
--- a/drivers/usb/chipidea/ci.h
+++ b/drivers/usb/chipidea/ci.h
@@ -67,18 +67,14 @@ enum ci_role {
/**
* struct ci_role_driver - host/gadget role driver
- * init: init this role (used at module probe)
* start: start this role (used at id switch)
* stop: stop this role (used at id switch)
- * destroy: destroy this role (used at module remove)
* irq: irq handler for this role
* name: role name string (host/gadget)
*/
struct ci_role_driver {
- int (*init)(struct ci13xxx *);
int (*start)(struct ci13xxx *);
void (*stop)(struct ci13xxx *);
- void (*destroy)(struct ci13xxx *);
irqreturn_t (*irq)(struct ci13xxx *);
const char *name;
};
@@ -212,17 +208,6 @@ static inline void ci_role_stop(struct ci13xxx *ci)
ci->roles[role]->stop(ci);
}
-static inline void ci_role_destroy(struct ci13xxx *ci)
-{
- enum ci_role role = ci->role;
-
- if (role == CI_ROLE_END)
- return;
-
- ci->role = CI_ROLE_END;
-
- ci->roles[role]->destroy(ci);
-}
/******************************************************************************
* REGISTERS
*****************************************************************************/
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index a61e759..83f35fa 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -402,6 +402,12 @@ static ssize_t store_role(struct device *dev, struct device_attribute *attr,
if (ret)
return ret;
+ /*
+ * there won't be an interrupt in case of manual switching,
+ * so we need to check vbus session manually
+ */
+ ci_handle_vbus_change(ci);
+
return count;
}
@@ -592,30 +598,6 @@ static int ci_hdrc_probe(struct platform_device *pdev)
otgsc = hw_read(ci, OP_OTGSC, ~0);
- /*
- * If the gadget is supported, call its init unconditionally,
- * We need to support load gadget module at init.rc.
- */
- if (ci->roles[CI_ROLE_GADGET]) {
- ret = ci->roles[CI_ROLE_GADGET]->init(ci);
- if (ret) {
- dev_err(dev, "can't init %s role, ret=%d\n",
- ci_role(ci)->name, ret);
- ret = -ENODEV;
- goto rm_wq;
- }
- }
-
- if (ci->role == CI_ROLE_HOST) {
- ret = ci->roles[CI_ROLE_HOST]->init(ci);
- if (ret) {
- dev_err(dev, "can't init %s role, ret=%d\n",
- ci_role(ci)->name, ret);
- ret = -ENODEV;
- goto rm_wq;
- }
- }
-
platform_set_drvdata(pdev, ci);
ret = request_irq(ci->irq, ci_irq, IRQF_SHARED, ci->platdata->name,
ci);
@@ -626,6 +608,8 @@ static int ci_hdrc_probe(struct platform_device *pdev)
if (ret)
goto rm_attr;
+ ci_role_start(ci, ci->role);
+
/* Handle the situation that usb device at the MicroB to A cable */
if (ci->is_otg && !(otgsc & OTGSC_ID))
queue_delayed_work(ci->wq, &ci->dwork, msecs_to_jiffies(500));
@@ -651,7 +635,8 @@ static int ci_hdrc_remove(struct platform_device *pdev)
destroy_workqueue(ci->wq);
device_remove_file(ci->dev, &dev_attr_role);
free_irq(ci->irq, ci);
- ci_role_destroy(ci);
+ ci_hdrc_gadget_destroy(ci);
+ ci_hdrc_host_destroy(ci);
return 0;
}
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index 7f4538c..ead3158 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -95,10 +95,8 @@ int ci_hdrc_host_init(struct ci13xxx *ci)
if (!rdrv)
return -ENOMEM;
- rdrv->init = host_start;
rdrv->start = host_start;
rdrv->stop = host_stop;
- rdrv->destroy = host_stop;
rdrv->irq = host_irq;
rdrv->name = "host";
ci->roles[CI_ROLE_HOST] = rdrv;
@@ -107,3 +105,9 @@ int ci_hdrc_host_init(struct ci13xxx *ci)
return 0;
}
+
+void ci_hdrc_host_destroy(struct ci13xxx *ci)
+{
+ if (ci->role == CI_ROLE_HOST)
+ host_stop(ci);
+}
diff --git a/drivers/usb/chipidea/host.h b/drivers/usb/chipidea/host.h
index 761fb1f..2e529be 100644
--- a/drivers/usb/chipidea/host.h
+++ b/drivers/usb/chipidea/host.h
@@ -4,6 +4,7 @@
#ifdef CONFIG_USB_CHIPIDEA_HOST
int ci_hdrc_host_init(struct ci13xxx *ci);
+void ci_hdrc_host_destroy(struct ci13xxx *ci);
#else
@@ -12,6 +13,10 @@ static inline int ci_hdrc_host_init(struct ci13xxx *ci)
return -ENXIO;
}
+static void ci_hdrc_host_destroy(struct ci13xxx *ci)
+{
+}
+
#endif
#endif /* __DRIVERS_USB_CHIPIDEA_HOST_H */
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 38446de..38b06ac 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1750,10 +1750,10 @@ static int udc_start(struct ci13xxx *ci)
* - Enable vbus detect
* - If it has already connected to host, notify udc
*/
- if (ci->role == CI_ROLE_GADGET) {
+ //if (ci->role == CI_ROLE_GADGET) {
ci_enable_otg_interrupt(ci, OTGSC_BSVIE);
ci_handle_vbus_change(ci);
- }
+ //}
return retval;
@@ -1798,11 +1798,10 @@ static void udc_id_switch_for_host(struct ci13xxx *ci)
}
/**
- * udc_remove: parent remove must call this to remove UDC
- *
- * No interrupts active, the IRQ has been released
+ * ci_hdrc_gadget_init - initialize device related bits
+ * ci: the controller
*/
-static void udc_stop(struct ci13xxx *ci)
+void ci_hdrc_gadget_destroy(struct ci13xxx *ci)
{
if (ci == NULL)
return;
@@ -1821,8 +1820,6 @@ static void udc_stop(struct ci13xxx *ci)
}
dbg_remove_files(&ci->gadget.dev);
device_unregister(&ci->gadget.dev);
- /* my kobject is dynamic, I swear! */
- memset(&ci->gadget, 0, sizeof(ci->gadget));
}
/**
@@ -1842,13 +1839,11 @@ int ci_hdrc_gadget_init(struct ci13xxx *ci)
if (!rdrv)
return -ENOMEM;
- rdrv->init = udc_start;
rdrv->start = udc_id_switch_for_device;
rdrv->stop = udc_id_switch_for_host;
- rdrv->destroy = udc_stop;
rdrv->irq = udc_irq;
rdrv->name = "gadget";
ci->roles[CI_ROLE_GADGET] = rdrv;
- return 0;
+ return udc_start(ci);
}
diff --git a/drivers/usb/chipidea/udc.h b/drivers/usb/chipidea/udc.h
index 4ff2384d..12fd7cf 100644
--- a/drivers/usb/chipidea/udc.h
+++ b/drivers/usb/chipidea/udc.h
@@ -80,6 +80,7 @@ struct ci13xxx_req {
#ifdef CONFIG_USB_CHIPIDEA_UDC
int ci_hdrc_gadget_init(struct ci13xxx *ci);
+void ci_hdrc_gadget_destroy(struct ci13xxx *ci);
#else
@@ -88,6 +89,10 @@ static inline int ci_hdrc_gadget_init(struct ci13xxx *ci)
return -ENXIO;
}
+static void ci_hdrc_gadget_destroy(struct ci13xxx *ci)
+{
+}
+
#endif
#endif /* __DRIVERS_USB_CHIPIDEA_UDC_H */
---cut---
Which is shorter (32 insertions(+), 53 deletions(-)) and makes the main
probe easier on the eyes. What do you think?
Regards,
--
Alex
^ permalink raw reply related
* [PATCH 1/2] ARM: dts: omap3-overo: Add support for pwm-leds
From: Peter Ujfalusi @ 2013-01-25 12:07 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <51024254.40208@ti.com>
On 01/25/2013 09:29 AM, Peter Ujfalusi wrote:
> On 01/24/2013 10:14 PM, Florian Vaussard wrote:
>> You are right. But then the pwm core must provide a way to know if the pwm
>> access function are callable
>> from atomic context or not (the gpio framework provides gpio_cansleep()).
>> This implies a good amount of changes to the pwm framework, and currently we
>> are the only driver using non-atomic access.
>
> We have two drivers at the moment: pwm-twl and pwm-twl-led. However new out of
> SoC PWM drivers might come (for example for palmas). So it worth take a look
> at some generic implementation.
OK. So I have the series. I need to add few more things but pwm-leds on
BeagleBoard works fine when I put the default_trigger for the pmustat LED to
be mmc0. It is blinking happily ;)
I'll CC you with the patches when I send them.
--
P?ter
^ permalink raw reply
* [PATCH v2 1/2] clk: divider: prepare for minimum divider
From: Mohammed, Afzal @ 2013-01-25 12:06 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130124170630.10623.78749@quantum>
Hi Mike,
On Thu, Jan 24, 2013 at 22:36:30, Mike Turquette wrote:
> Quoting Mohammed, Afzal (2013-01-24 03:29:15)
> > It is a functional constraint: divider has 8 bits and it can have
> > all possible values (0 to 255) and divider value corresponds to
> > value set in the 8 bits. But depending on the modes the minimum
> > value that can be configured (to get display working) varies.
> > Eg. For raster mode (which the driver is presently supporting), it
> > can take a minimum value of 2, while in LIDD (LCD interface display
> > driver) mode it can take a min value of 1.
> >
> > Here min rate is not a constraint w.r.t divider in LCDC IP, but
> > rather min divider.
> Just so I understand correctly... you are saying that the functional
> constraint is not caused by the clock rate, but instead by the divider
> value? For the different modes (raster vs LIDD) is the clock rate the
> same, or is the clock rate different?
> What is the clock output rate of the divider in raster mode? What is
> the clock output rate of the divider in LIDD mode?
Yes, functional constraint in caused by divider value.
clock output rate can defined for both modes as follows,
p_clk (clock output rate) = lcd_clk (input clock rate) / div,
to configure "div", we have r/w 8 bits, so div values can
range from 0-255,
And IP spec says value "0" and "1" should not be written, in
raster mode. Further it says if in LIDD mode it can have values
from 0-255, but effect of writing "0" is same as "1".
Effect of divider value on output rate is in the same way for
both modes as per above expression (except for writing "0" in
LIDD mode).
The driver supports only raster mode.
Regards
Afzal
Note: link to trm has been mentioned in the earlier reply.
^ permalink raw reply
* [PATCH v4 4/4] drivers: usb: start using the control module driver
From: kishon @ 2013-01-25 11:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20130125102700.GO15886@arwen.pp.htv.fi>
On Friday 25 January 2013 03:57 PM, Felipe Balbi wrote:
> Hi,
>
> On Fri, Jan 25, 2013 at 03:54:00PM +0530, Kishon Vijay Abraham I wrote:
>> Start using the control module driver for powering on the PHY and for
>> writing to the mailbox instead of writing to the control module
>> registers on their own.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> Documentation/devicetree/bindings/usb/omap-usb.txt | 4 ++
>> Documentation/devicetree/bindings/usb/usb-phy.txt | 7 +-
>> arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 13 ----
>
> I'm taking this patch but I'm leaving out the omap_hwmod_44xx_data.c
> change just to kill dependency. Can you send that single change as a
> separate patch which Tony can queue ?
>
Sure.
Thanks
Kishon
^ permalink raw reply
* [PATCH 3/3] clk: Fixup locking issues for clk_set_parent
From: Ulf Hansson @ 2013-01-25 11:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359114057-11681-1-git-send-email-ulf.hansson@stericsson.com>
From: Ulf Hansson <ulf.hansson@linaro.org>
Updating the clock tree topology must be protected with the spinlock
when doing clk_set_parent, otherwise we can not handle the migration
of the enable_count in a safe manner.
While issuing the .set_parent callback to make the clk-hw perform the
switch to the new parent, we can not hold the spinlock since it is must
be allowed to be slow path. This complicates error handling, but is still
possible to achieve.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/clk/clk.c | 68 +++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 51 insertions(+), 17 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index a61cf6d..0c19420 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1258,30 +1258,69 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent, u8 p_index)
unsigned long flags;
int ret;
struct clk *old_parent = clk->parent;
+ bool migrated_enable = false;
- /* migrate prepare and enable */
+ /* migrate prepare */
if (clk->prepare_count)
__clk_prepare(parent);
- /* FIXME replace with clk_is_enabled(clk) someday */
spin_lock_irqsave(&enable_lock, flags);
- if (clk->enable_count)
+
+ /* migrate enable */
+ if (clk->enable_count) {
__clk_enable(parent);
+ migrated_enable = true;
+ }
+
+ /* update the clk tree topology */
+ clk_reparent(clk, parent);
+
spin_unlock_irqrestore(&enable_lock, flags);
/* change clock input source */
ret = clk->ops->set_parent(clk->hw, p_index);
+ if (ret) {
+ /*
+ * The error handling is tricky due to that we need to release
+ * the spinlock while issuing the .set_parent callback. This
+ * means the new parent might have been enabled/disabled in
+ * between, which must be considered when doing rollback.
+ */
+ spin_lock_irqsave(&enable_lock, flags);
- /* clean up old prepare and enable */
- spin_lock_irqsave(&enable_lock, flags);
- if (clk->enable_count)
+ clk_reparent(clk, old_parent);
+
+ if (migrated_enable && clk->enable_count) {
+ __clk_disable(parent);
+ } else if (migrated_enable && (clk->enable_count == 0)) {
+ __clk_disable(old_parent);
+ } else if (!migrated_enable && clk->enable_count) {
+ __clk_disable(parent);
+ __clk_enable(old_parent);
+ }
+
+ spin_unlock_irqrestore(&enable_lock, flags);
+
+ if (clk->prepare_count)
+ __clk_unprepare(parent);
+
+ return ret;
+ }
+
+ /* clean up enable for old parent if migration was done */
+ if (migrated_enable) {
+ spin_lock_irqsave(&enable_lock, flags);
__clk_disable(old_parent);
- spin_unlock_irqrestore(&enable_lock, flags);
+ spin_unlock_irqrestore(&enable_lock, flags);
+ }
+ /* clean up prepare for old parent if migration was done */
if (clk->prepare_count)
__clk_unprepare(old_parent);
- return ret;
+ /* update debugfs with new clk tree topology */
+ clk_debug_reparent(clk, parent);
+ return 0;
}
/**
@@ -1339,16 +1378,11 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
/* do the re-parent */
ret = __clk_set_parent(clk, parent, p_index);
- /* propagate ABORT_RATE_CHANGE if .set_parent failed */
- if (ret) {
+ /* propagate rate recalculation accordingly */
+ if (ret)
__clk_recalc_rates(clk, ABORT_RATE_CHANGE);
- goto out;
- }
-
- /* propagate rate recalculation downstream */
- clk_reparent(clk, parent);
- clk_debug_reparent(clk, parent);
- __clk_recalc_rates(clk, POST_RATE_CHANGE);
+ else
+ __clk_recalc_rates(clk, POST_RATE_CHANGE);
out:
mutex_unlock(&prepare_lock);
--
1.7.10
^ permalink raw reply related
* [PATCH 2/3] clk: Improve errorhandling for clk_set_parent
From: Ulf Hansson @ 2013-01-25 11:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359114057-11681-1-git-send-email-ulf.hansson@stericsson.com>
From: Ulf Hansson <ulf.hansson@linaro.org>
By verifying all the needed static information before doing the clk
notifications, we minimize number of unwanted rollback notifications
with ABORT_RATE_CHANGE message to occur.
Additionally make sure the parent are valid pointer before using it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/clk/clk.c | 48 +++++++++++++++++++++++++++++-------------------
1 file changed, 29 insertions(+), 19 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 2e10cc1..a61cf6d 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1227,15 +1227,10 @@ static void clk_reparent(struct clk *clk, struct clk *new_parent)
clk->parent = new_parent;
}
-static int __clk_set_parent(struct clk *clk, struct clk *parent)
+static u8 clk_fetch_parent_index(struct clk *clk, struct clk *parent)
{
- struct clk *old_parent;
- unsigned long flags;
- int ret = -EINVAL;
u8 i;
- old_parent = clk->parent;
-
if (!clk->parents)
clk->parents = kzalloc((sizeof(struct clk*) * clk->num_parents),
GFP_KERNEL);
@@ -1255,11 +1250,14 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent)
}
}
- if (i == clk->num_parents) {
- pr_debug("%s: clock %s is not a possible parent of clock %s\n",
- __func__, parent->name, clk->name);
- goto out;
- }
+ return i;
+}
+
+static int __clk_set_parent(struct clk *clk, struct clk *parent, u8 p_index)
+{
+ unsigned long flags;
+ int ret;
+ struct clk *old_parent = clk->parent;
/* migrate prepare and enable */
if (clk->prepare_count)
@@ -1272,7 +1270,7 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent)
spin_unlock_irqrestore(&enable_lock, flags);
/* change clock input source */
- ret = clk->ops->set_parent(clk->hw, i);
+ ret = clk->ops->set_parent(clk->hw, p_index);
/* clean up old prepare and enable */
spin_lock_irqsave(&enable_lock, flags);
@@ -1283,7 +1281,6 @@ static int __clk_set_parent(struct clk *clk, struct clk *parent)
if (clk->prepare_count)
__clk_unprepare(old_parent);
-out:
return ret;
}
@@ -1302,8 +1299,9 @@ out:
int clk_set_parent(struct clk *clk, struct clk *parent)
{
int ret = 0;
+ u8 p_index;
- if (!clk || !clk->ops)
+ if (!clk || !clk->ops || !parent)
return -EINVAL;
if (!clk->ops->set_parent)
@@ -1315,6 +1313,21 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
if (clk->parent == parent)
goto out;
+ /* check that we are allowed to re-parent if the clock is in use */
+ if ((clk->flags & CLK_SET_PARENT_GATE) && clk->prepare_count) {
+ ret = -EBUSY;
+ goto out;
+ }
+
+ /* try finding the new parent index */
+ p_index = clk_fetch_parent_index(clk, parent);
+ if (p_index == clk->num_parents) {
+ pr_debug("%s: clock %s is not a possible parent of clock %s\n",
+ __func__, parent->name, clk->name);
+ ret = -EINVAL;
+ goto out;
+ }
+
/* propagate PRE_RATE_CHANGE notifications */
if (clk->notifier_count)
ret = __clk_speculate_rates(clk, parent->rate);
@@ -1323,11 +1336,8 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
if (ret == NOTIFY_STOP)
goto out;
- /* only re-parent if the clock is not in use */
- if ((clk->flags & CLK_SET_PARENT_GATE) && clk->prepare_count)
- ret = -EBUSY;
- else
- ret = __clk_set_parent(clk, parent);
+ /* do the re-parent */
+ ret = __clk_set_parent(clk, parent, p_index);
/* propagate ABORT_RATE_CHANGE if .set_parent failed */
if (ret) {
--
1.7.10
^ permalink raw reply related
* [PATCH 1/3] clk: Remove _clk_reparent from API and restructure code
From: Ulf Hansson @ 2013-01-25 11:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359114057-11681-1-git-send-email-ulf.hansson@stericsson.com>
From: Ulf Hansson <ulf.hansson@linaro.org>
There shall be no reason for keeping this API available for clock
providers. So we remove it from the API and restrcuture the code so
for example the COMMON_CLK_DEBUG part is separated.
This patch will also make it possible to hold the spinlock over the
actual update of the clock tree topology, which could not be done
before when both debugfs updates and clock rate updates was done
within the same function.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/clk/clk.c | 82 ++++++++++++++++++++++++------------------
include/linux/clk-provider.h | 1 -
2 files changed, 48 insertions(+), 35 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 593a2e4..2e10cc1 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -284,6 +284,39 @@ out:
}
/**
+ * clk_debug_reparent - reparent clk node in the debugfs clk tree
+ * @clk: the clk being reparented
+ * @new_parent: the new clk parent, may be NULL
+ *
+ * Rename clk entry in the debugfs clk tree if debugfs has been
+ * initialized. Otherwise it bails out early since the debugfs clk tree
+ * will be created lazily by clk_debug_init as part of a late_initcall.
+ *
+ * Caller must hold prepare_lock.
+ */
+static void clk_debug_reparent(struct clk *clk, struct clk *new_parent)
+{
+ struct dentry *d;
+ struct dentry *new_parent_d;
+
+ if (!inited)
+ return;
+
+ if (new_parent)
+ new_parent_d = new_parent->dentry;
+ else
+ new_parent_d = orphandir;
+
+ d = debugfs_rename(clk->dentry->d_parent, clk->dentry,
+ new_parent_d, clk->name);
+ if (d)
+ clk->dentry = d;
+ else
+ pr_debug("%s: failed to rename debugfs entry for %s\n",
+ __func__, clk->name);
+}
+
+/**
* clk_debug_init - lazily create the debugfs clk tree visualization
*
* clks are often initialized very early during boot before memory can
@@ -338,6 +371,9 @@ static int __init clk_debug_init(void)
late_initcall(clk_debug_init);
#else
static inline int clk_debug_register(struct clk *clk) { return 0; }
+static inline void clk_debug_reparent(struct clk *clk, struct clk *new_parent)
+{
+}
#endif
/* caller must hold prepare_lock */
@@ -1179,16 +1215,8 @@ out:
return ret;
}
-void __clk_reparent(struct clk *clk, struct clk *new_parent)
+static void clk_reparent(struct clk *clk, struct clk *new_parent)
{
-#ifdef CONFIG_COMMON_CLK_DEBUG
- struct dentry *d;
- struct dentry *new_parent_d;
-#endif
-
- if (!clk || !new_parent)
- return;
-
hlist_del(&clk->child_node);
if (new_parent)
@@ -1196,28 +1224,7 @@ void __clk_reparent(struct clk *clk, struct clk *new_parent)
else
hlist_add_head(&clk->child_node, &clk_orphan_list);
-#ifdef CONFIG_COMMON_CLK_DEBUG
- if (!inited)
- goto out;
-
- if (new_parent)
- new_parent_d = new_parent->dentry;
- else
- new_parent_d = orphandir;
-
- d = debugfs_rename(clk->dentry->d_parent, clk->dentry,
- new_parent_d, clk->name);
- if (d)
- clk->dentry = d;
- else
- pr_debug("%s: failed to rename debugfs entry for %s\n",
- __func__, clk->name);
-out:
-#endif
-
clk->parent = new_parent;
-
- __clk_recalc_rates(clk, POST_RATE_CHANGE);
}
static int __clk_set_parent(struct clk *clk, struct clk *parent)
@@ -1329,7 +1336,9 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
}
/* propagate rate recalculation downstream */
- __clk_reparent(clk, parent);
+ clk_reparent(clk, parent);
+ clk_debug_reparent(clk, parent);
+ __clk_recalc_rates(clk, POST_RATE_CHANGE);
out:
mutex_unlock(&prepare_lock);
@@ -1453,14 +1462,19 @@ int __clk_init(struct device *dev, struct clk *clk)
hlist_for_each_entry_safe(orphan, tmp, tmp2, &clk_orphan_list, child_node) {
if (orphan->ops->get_parent) {
i = orphan->ops->get_parent(orphan->hw);
- if (!strcmp(clk->name, orphan->parent_names[i]))
- __clk_reparent(orphan, clk);
+ if (!strcmp(clk->name, orphan->parent_names[i])) {
+ clk_reparent(orphan, clk);
+ clk_debug_reparent(orphan, clk);
+ __clk_recalc_rates(orphan, POST_RATE_CHANGE);
+ }
continue;
}
for (i = 0; i < orphan->num_parents; i++)
if (!strcmp(clk->name, orphan->parent_names[i])) {
- __clk_reparent(orphan, clk);
+ clk_reparent(orphan, clk);
+ clk_debug_reparent(orphan, clk);
+ __clk_recalc_rates(orphan, POST_RATE_CHANGE);
break;
}
}
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 4989b8a..87a7c2c 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -359,7 +359,6 @@ struct clk *__clk_lookup(const char *name);
*/
int __clk_prepare(struct clk *clk);
void __clk_unprepare(struct clk *clk);
-void __clk_reparent(struct clk *clk, struct clk *new_parent);
unsigned long __clk_round_rate(struct clk *clk, unsigned long rate);
struct of_device_id;
--
1.7.10
^ permalink raw reply related
* [PATCH 0/3] Fixup issues for clk_set_parent
From: Ulf Hansson @ 2013-01-25 11:40 UTC (permalink / raw)
To: linux-arm-kernel
From: Ulf Hansson <ulf.hansson@linaro.org>
Issues with racing for fetching spinlocks is present in the
clk_set_parent API. This patchset is trying to fixup these issues.
In short, while updating the clock tree toplogy the spinlock must be held
to prevent enable_count from being messed up.
Patch 1 and 2 prepares for patch 3, which is where the real issue are
resolved.
Ulf Hansson (3):
clk: Remove _clk_reparent from API and restructure code
clk: Improve errorhandling for clk_set_parent
clk: Fixup locking issues for clk_set_parent
drivers/clk/clk.c | 192 +++++++++++++++++++++++++++---------------
include/linux/clk-provider.h | 1 -
2 files changed, 125 insertions(+), 68 deletions(-)
--
1.7.10
^ permalink raw reply
* [PATCH 4/4] irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
From: Srinidhi Kasagar @ 2013-01-25 11:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1358963974-5496-5-git-send-email-catalin.marinas@arm.com>
On Wed, Jan 23, 2013 at 18:59:34 +0100, Catalin Marinas wrote:
> All the calls to gic_secondary_init() pass 0 as the first argument.
> Since this function is called on each CPU when starting, it can be done
> in a platform-independent way via a CPU notifier registered by the GIC
> code.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Sascha Hauer <kernel@pengutronix.de>
> Cc: David Brown <davidb@codeaurora.org>
> Cc: Daniel Walker <dwalker@fifo99.com>
> Cc: Bryan Huntsman <bryanh@codeaurora.org>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Simon Horman <horms@verge.net.au>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: Dinh Nguyen <dinguyen@altera.com>
> Cc: Viresh Kumar <viresh.linux@gmail.com>
> Cc: Shiraz Hashim <shiraz.hashim@st.com>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
For ux500, it is
Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
thanks,
srinidhi
^ permalink raw reply
* [PATCH] ARM: davinci: da850: add RTC driver DT entries
From: Sekhar Nori @ 2013-01-25 11:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4232EB8829679242B82E712C3DB3149D4233E9@DBDE01.ent.ti.com>
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 <mrugesh.mk@ti.com>
>>> ---
>>> Applies on top of v3.8-rc4 of linus tree.
>>>
>>> Tested on da850-evm device.
>>>
>>> Test Procedure:
>>> date [YYYY.]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 at 1d0d000 {
>>> status = "okay";
>>> };
>>> + rtc at 1c23000 {
I did not mention this last time, but this should be:
rtc0: rtc at 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 at 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
^ permalink raw reply
* [PATCH] ARM: davinci: da850: add interrupt-parent property in soc node
From: Prabhakar Lad @ 2013-01-25 11:18 UTC (permalink / raw)
To: linux-arm-kernel
From: Lad, Prabhakar <prabhakar.lad@ti.com>
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 <prabhakar.lad@ti.com>
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: devicetree-discuss at lists.ozlabs.org
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Heiko Schocher <hs@denx.de>
---
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 0x01c00000 0x400000>;
+ interrupt-parent = <&intc>;
pmx_core: pinmux at 1c14120 {
compatible = "pinctrl-single";
@@ -62,7 +63,6 @@
clock-frequency = <150000000>;
reg-shift = <2>;
interrupts = <25>;
- interrupt-parent = <&intc>;
status = "disabled";
};
serial1: serial at 1d0c000 {
@@ -71,7 +71,6 @@
clock-frequency = <150000000>;
reg-shift = <2>;
interrupts = <53>;
- interrupt-parent = <&intc>;
status = "disabled";
};
serial2: serial at 1d0d000 {
@@ -80,7 +79,6 @@
clock-frequency = <150000000>;
reg-shift = <2>;
interrupts = <61>;
- interrupt-parent = <&intc>;
status = "disabled";
};
};
--
1.7.4.1
^ permalink raw reply related
* [RFC V2 PATCH 0/8] ARM: kirkwood: cleanup DT conversion
From: Arnd Bergmann @ 2013-01-25 11:15 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <cover.1359091286.git.jason@lakedaemon.net>
On Friday 25 January 2013, Jason Cooper wrote:
> This is a second cut at cleaning up mach-kirkwood/. There are a few DT
> conversions (topkick -> mvsdio, pinctrl) which, once reviewed, I'll put in the
> normal pull request cycle.
>
> The others which remove board-*.c files, I'll keep updating against
> mvebu/for-next, and then apply at the end of the merge window.
>
> Please test as you are able.
Great work, it's really nice to see where things are going now!
In patch 7, the changeset text seems to be indented wrong, but the
patch is still good.
I wonder if it makes sense to collapse the few remaining DT based
board files now and move their entire contents back into board-dt.c.
Of course, if you think they will all be gone soon anyway, there
is no point.
Arnd
^ permalink raw reply
* [PATCH v2 6/6] ARM: dts: palmas: update dt data for palmas-usb
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Update palmas-usb data node in palmas device tree file
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/palmas.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/palmas.dtsi b/arch/arm/boot/dts/palmas.dtsi
index d20adb4..0cf39da 100644
--- a/arch/arm/boot/dts/palmas.dtsi
+++ b/arch/arm/boot/dts/palmas.dtsi
@@ -318,8 +318,8 @@
palmas_usb {
compatible = "ti,palmas-usb";
- ti,no_control_vbus = <0>;
- ti,wakeup = <0>;
+ ti,wakeup;
+ vbus-supply = <&smps10_reg>;
};
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 5/6] ARM: dts: omap5: add dwc3 core dt data
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt
data file. The information for the entered data node is available @
Documentation/devicetree/bindings/usb/dwc3.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/omap5.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 1703a72..58118c4 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -522,6 +522,13 @@
#size-cells = <1>;
utmi-mode = <2>;
ranges;
+ dwc3 at 4a030000 {
+ compatible = "synopsys,dwc3";
+ reg = <0x4a030000 0xcfff>;
+ interrupts = <0 92 4>;
+ usb-phy = <&usb2_phy>, <&usb3_phy>;
+ tx-fifo-resize;
+ };
};
ocp2scp {
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Add dwc3 omap glue data to the omap5 dt data file. The information about
the dt node added here is available @
Documentation/devicetree/bindings/usb/omap-usb.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/omap5.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 5f59bf2..1703a72 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -513,6 +513,17 @@
ti,type = <2>;
};
+ omap_dwc3 at 4a020000 {
+ compatible = "ti,dwc3";
+ ti,hwmods = "usb_otg_ss";
+ reg = <0x4a020000 0x1ff>;
+ interrupts = <0 93 4>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ utmi-mode = <2>;
+ ranges;
+ };
+
ocp2scp {
compatible = "ti,omap-ocp2scp";
#address-cells = <1>;
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 3/6] ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Add omap-usb3 and omap-usb2 data node in omap5 device tree file.
The information for the node added here is available @
Documentation/devicetree/bindings/usb/usb-phy.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/omap5.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index d149330..5f59bf2 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -519,6 +519,20 @@
#size-cells = <1>;
ranges;
ti,hwmods = "ocp2scp1";
+ usb2_phy: usb2phy at 4a084000 {
+ compatible = "ti,omap-usb2";
+ reg = <0x4a084000 0x7c>;
+ ctrl-module = <&omap_control_usb>;
+ };
+
+ usb3_phy: usb3phy at 4a084400 {
+ compatible = "ti,omap-usb3";
+ reg = <0x4a084400 0x80>,
+ <0x4a084800 0x64>,
+ <0x4a084c00 0x40>;
+ reg-names = "phy_rx", "phy_tx", "pll_ctrl";
+ ctrl-module = <&omap_control_usb>;
+ };
};
};
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 2/6] ARM: dts: omap5: Add ocp2scp data
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Add ocp2scp data node in omap5 device tree file. The information for
the node added here can be found @
Documentation/devicetree/bindings/bus/omap-ocp2scp.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/omap5.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index edc7464..d149330 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -512,5 +512,13 @@
reg-names = "control_dev_conf", "phy_power_usb";
ti,type = <2>;
};
+
+ ocp2scp {
+ compatible = "ti,omap-ocp2scp";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ ti,hwmods = "ocp2scp1";
+ };
};
};
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 1/6] ARM: dts: omap5: Add omap control usb data
From: Kishon Vijay Abraham I @ 2013-01-25 11:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1359112312-6918-1-git-send-email-kishon@ti.com>
Add omap control usb data in omap5 device tree file. This will have the
register address of registers to power on the USB2 PHY and USB3 PHY. The
information for the node added here is available in
Documentation/devicetree/bindings/usb/omap-usb.txt
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/boot/dts/omap5.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 7a78d1b..edc7464 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -504,5 +504,13 @@
hw-caps-ll-interface;
hw-caps-temp-alert;
};
+
+ omap_control_usb: omap-control-usb at 4a002300 {
+ compatible = "ti,omap-control-usb";
+ reg = <0x4a002300 0x4>,
+ <0x4a002370 0x4>;
+ reg-names = "control_dev_conf", "phy_power_usb";
+ ti,type = <2>;
+ };
};
};
--
1.7.9.5
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox